Descriptionui/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
Committed: https://crrev.com/ac030e207c4d6609e5275fe24e0a65c23a3f74c0
Cr-Commit-Position: refs/heads/master@{#299253}
Patch Set 1 #Patch Set 2 : Change test names, add more tests. #Patch Set 3 : Use EXPECT, use gfx:: prefix. #Patch Set 4 : Add bounds version and tests. #Patch Set 5 : Profile from bounds, park NSWindow case. #Patch Set 6 : Add EmptyOffScreenBounds test. #Patch Set 7 : Use ui/gfx/mac/coordinate_conversion.h #Patch Set 8 : Update BUILD.gn, publish for review. #
Total comments: 7
Patch Set 9 : Change gfx::InvalidColorProfileLength test. #
Total comments: 5
Patch Set 10 : Add sRGB ui/gfx/color_profile.h comment. #
Total comments: 3
Patch Set 11 : #import <Cocoa/Cocoa.h> #Patch Set 12 : Join OVERRIDE -> override party. #
Total comments: 2
Messages
Total messages: 32 (5 generated)
|