Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(988)

Issue 612613002: ui/gfx/color_profile: implement GetDisplayColorProfile on mac (Closed)

Created:
6 years, 2 months ago by Noel Gordon
Modified:
6 years, 2 months ago
Reviewers:
Robert Sesek, danakj, sky
CC:
chromium-reviews, Ken Russell (switch to Gerrit), oshima, sky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -6 lines) Patch
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/color_profile.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -3 lines 0 comments Download
M ui/gfx/color_profile_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -3 lines 2 comments Download
A ui/gfx/color_profile_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +96 lines, -0 lines 0 comments Download
M ui/gfx/gfx_tests.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 32 (5 generated)
Noel Gordon
6 years, 2 months ago (2014-10-06 07:15:38 UTC) #3
Robert Sesek
https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm#newcode46 ui/gfx/color_profile_mac.mm:46: return true; Why do this and not assign the ...
6 years, 2 months ago (2014-10-06 17:56:00 UTC) #5
Robert Sesek
Also: the CL title has the directories in the wrong order (gfx/ui vs ui/gfx).
6 years, 2 months ago (2014-10-06 17:56:22 UTC) #6
Noel Gordon
On 2014/10/06 17:56:22, Robert Sesek wrote: > Also: the CL title has the directories in ...
6 years, 2 months ago (2014-10-07 01:42:03 UTC) #7
Noel Gordon
https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm#newcode46 ui/gfx/color_profile_mac.mm:46: return true; On 2014/10/06 17:56:00, Robert Sesek wrote: > ...
6 years, 2 months ago (2014-10-07 01:57:43 UTC) #8
Robert Sesek
https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm#newcode46 ui/gfx/color_profile_mac.mm:46: return true; On 2014/10/07 01:57:43, Noel Gordon wrote: > ...
6 years, 2 months ago (2014-10-07 14:20:10 UTC) #9
Noel Gordon
https://codereview.chromium.org/612613002/diff/180001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/180001/ui/gfx/color_profile_mac.mm#newcode14 ui/gfx/color_profile_mac.mm:14: NSScreen* screen = NULL; On 2014/10/07 14:20:10, Robert Sesek ...
6 years, 2 months ago (2014-10-07 23:34:27 UTC) #10
Noel Gordon
On 2014/10/07 14:20:10, Robert Sesek wrote: > https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm > File ui/gfx/color_profile_mac.mm (right): > > https://codereview.chromium.org/612613002/diff/160001/ui/gfx/color_profile_mac.mm#newcode46 ...
6 years, 2 months ago (2014-10-07 23:43:17 UTC) #11
Noel Gordon
On 2014/10/07 14:20:10, Robert Sesek wrote: > https://codereview.chromium.org/612613002/diff/180001/ui/gfx/color_profile_mac.mm > File ui/gfx/color_profile_mac.mm (right): > > https://codereview.chromium.org/612613002/diff/180001/ui/gfx/color_profile_mac.mm#newcode13 ...
6 years, 2 months ago (2014-10-07 23:54:09 UTC) #12
Noel Gordon
Ahem ... "be separate existence from" -> "have a separate existence from"
6 years, 2 months ago (2014-10-07 23:57:25 UTC) #13
Robert Sesek
LGTM % comment about the #include (below) On 2014/10/07 23:54:09, Noel Gordon wrote: > Yeah, ...
6 years, 2 months ago (2014-10-08 01:33:17 UTC) #14
Noel Gordon
https://codereview.chromium.org/612613002/diff/200001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/200001/ui/gfx/color_profile_mac.mm#newcode8 ui/gfx/color_profile_mac.mm:8: #include "base/mac/sdk_forward_declarations.h" On 2014/10/08 01:33:17, Robert Sesek wrote: > ...
6 years, 2 months ago (2014-10-08 01:58:58 UTC) #15
Robert Sesek
https://codereview.chromium.org/612613002/diff/200001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/200001/ui/gfx/color_profile_mac.mm#newcode8 ui/gfx/color_profile_mac.mm:8: #include "base/mac/sdk_forward_declarations.h" On 2014/10/08 01:58:58, Noel Gordon wrote: > ...
6 years, 2 months ago (2014-10-08 02:03:14 UTC) #16
Noel Gordon
On 2014/10/08 02:03:14, Robert Sesek wrote: > https://codereview.chromium.org/612613002/diff/200001/ui/gfx/color_profile_mac.mm > File ui/gfx/color_profile_mac.mm (right): > > https://codereview.chromium.org/612613002/diff/200001/ui/gfx/color_profile_mac.mm#newcode8 ...
6 years, 2 months ago (2014-10-08 02:14:37 UTC) #17
Robert Sesek
You don't need sdk_forward_declarations.h -- that's only used for targeting future OS features. Just import ...
6 years, 2 months ago (2014-10-08 02:16:11 UTC) #18
Noel Gordon
> you need to #import <Cocoa/Cocoa.h> ? If I do import that file, and ditch ...
6 years, 2 months ago (2014-10-08 02:18:51 UTC) #19
Noel Gordon
On 2014/10/08 02:18:51, Noel Gordon wrote: > > you need to #import <Cocoa/Cocoa.h> ? > ...
6 years, 2 months ago (2014-10-08 02:24:39 UTC) #20
Robert Sesek
LGTM
6 years, 2 months ago (2014-10-08 02:31:07 UTC) #21
Noel Gordon
On 2014/10/08 01:33:17, Robert Sesek wrote: > LGTM % comment about the #include (below) > ...
6 years, 2 months ago (2014-10-08 02:56:57 UTC) #22
Noel Gordon
On 2014/10/08 02:16:11, Robert Sesek wrote: > You don't need sdk_forward_declarations.h -- that's only used ...
6 years, 2 months ago (2014-10-08 04:33:04 UTC) #23
Noel Gordon
+danakj for OWNERS approval
6 years, 2 months ago (2014-10-08 04:39:36 UTC) #24
Noel Gordon
On 2014/10/08 04:39:36, Noel Gordon wrote: > +danakj for OWNERS approval or maybe +sky
6 years, 2 months ago (2014-10-09 23:02:17 UTC) #26
sky
LGTM assuming assign does what you want. https://codereview.chromium.org/612613002/diff/240001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/240001/ui/gfx/color_profile_mac.mm#newcode52 ui/gfx/color_profile_mac.mm:52: profile->assign(data, data ...
6 years, 2 months ago (2014-10-10 02:36:10 UTC) #27
Noel Gordon
https://codereview.chromium.org/612613002/diff/240001/ui/gfx/color_profile_mac.mm File ui/gfx/color_profile_mac.mm (right): https://codereview.chromium.org/612613002/diff/240001/ui/gfx/color_profile_mac.mm#newcode52 ui/gfx/color_profile_mac.mm:52: profile->assign(data, data + length); On 2014/10/10 02:36:10, sky wrote: ...
6 years, 2 months ago (2014-10-12 01:31:00 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/612613002/240001
6 years, 2 months ago (2014-10-12 01:33:54 UTC) #30
commit-bot: I haz the power
Committed patchset #12 (id:240001)
6 years, 2 months ago (2014-10-12 02:03:40 UTC) #31
commit-bot: I haz the power
6 years, 2 months ago (2014-10-12 02:04:08 UTC) #32
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/ac030e207c4d6609e5275fe24e0a65c23a3f74c0
Cr-Commit-Position: refs/heads/master@{#299253}

Powered by Google App Engine
This is Rietveld 408576698