ui/gfx/color_profile: implement GetDisplayColorProfile on mac
Like https://codereview.chromium.org/312723003 for win32, extract the display color profile associated with a screen display device on mac given rectangular bounds in screen coordinates. Use gfx::ScreenRectFromNSRect to compute the screen that overlaps the bounds most to match the gfx::Screen concept of overlap. Add unit tests for on-screen, partially-on-screen, off-screen and empty bounds. Note an sRGB color profile is a common case, especially on win32, so GetDisplayColorProfile returns true and an empty color profile in that case. Add a header file comment about that. TEST=gfx_unittests --gtest_filter="ColorProfileTest*Bounds" BUG=368694 Review URL: https://codereview.chromium.org/612613002 Cr-Commit-Position: refs/heads/master@{#299253}
Showing
Please register or sign in to comment