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

Issue 263643004: Teach gfx::Screen about color profiles (Closed)

Created:
6 years, 7 months ago by Noel Gordon
Modified:
4 years, 6 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, ben+aura_chromium.org, abarth-chromium, Aaron Boodman, chromium-apps-reviews_chromium.org, kalyank, darin (slow to review), ben+mojo_chromium.org, ben+ash_chromium.org, Elliot Glaysher
Visibility:
Public.

Description

Teach gfx::Screen about color profiles Stub in an api for getting the screen color profile associated with a native view. Add TODO's for implementation. BUG=368694

Patch Set 1 : Try compilations. #

Patch Set 2 : Add desktop_aura/desktop_screen_x11.h #

Total comments: 7

Patch Set 3 : Add ICC to screen.h comment. #

Patch Set 4 : Mojo movers [sky]. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -0 lines) Patch
M ash/display/screen_ash.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ash/display/screen_ash.cc View 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/system_display/system_display_apitest.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/aura/screen_mojo.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/aura/screen_mojo.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M ui/aura/test/test_screen.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/aura/test/test_screen.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/screen.h View 1 2 1 chunk +4 lines, -0 lines 1 comment Download
M ui/gfx/screen_android.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/gfx/screen_ios.mm View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M ui/gfx/screen_mac.mm View 1 chunk +16 lines, -0 lines 0 comments Download
M ui/gfx/screen_win.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/screen_win.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Noel Gordon
6 years, 7 months ago (2014-04-30 15:46:13 UTC) #1
Noel Gordon
ui/views/widget/desktop_aura/desktop_screen_x11.h just has to be different from every other port Screen implementation, dunno why.
6 years, 7 months ago (2014-04-30 16:32:09 UTC) #2
Ken Russell (switch to Gerrit)
LGTM overall. https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode76 ui/gfx/screen.h:76: // Returns the color profile of the ...
6 years, 7 months ago (2014-04-30 17:43:17 UTC) #3
Noel Gordon
https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode76 ui/gfx/screen.h:76: // Returns the color profile of the display nearest ...
6 years, 7 months ago (2014-04-30 17:51:29 UTC) #4
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode76 ui/gfx/screen.h:76: // Returns the color profile of the display nearest ...
6 years, 7 months ago (2014-04-30 17:52:02 UTC) #5
oshima
you also have to update ui/views/widget/desktop_aura/desktop_screen_win, i think. https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode78 ui/gfx/screen.h:78: NativeView ...
6 years, 7 months ago (2014-04-30 18:18:53 UTC) #6
Noel Gordon
https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode76 ui/gfx/screen.h:76: // Returns the color profile of the display nearest ...
6 years, 7 months ago (2014-05-01 05:24:54 UTC) #7
Noel Gordon
https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode78 ui/gfx/screen.h:78: NativeView view, std::vector<char>* color_profile) const = 0; On 2014/04/30 ...
6 years, 7 months ago (2014-05-01 05:52:21 UTC) #8
Noel Gordon
Filed crbug.com/368995 abou the linux_chromeos-asan compile brokenness.
6 years, 7 months ago (2014-05-01 06:07:28 UTC) #9
Noel Gordon
https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h#newcode78 ui/gfx/screen.h:78: NativeView view, std::vector<char>* color_profile) const = 0; On 2014/04/30 ...
6 years, 7 months ago (2014-05-01 07:33:24 UTC) #10
Noel Gordon
On 2014/04/30 18:18:53, oshima wrote: > you also have to update ui/views/widget/desktop_aura/desktop_screen_win, i > think. ...
6 years, 7 months ago (2014-05-01 07:47:30 UTC) #11
oshima
On 2014/05/01 07:33:24, Noel Gordon (Google) wrote: > https://codereview.chromium.org/263643004/diff/80001/ui/gfx/screen.h > File ui/gfx/screen.h (right): > > ...
6 years, 7 months ago (2014-05-01 19:12:01 UTC) #12
Noel Gordon
On 2014/05/01 19:12:01, oshima wrote: > I replied on 357443. Thank you. > Maybe I ...
6 years, 7 months ago (2014-05-05 15:10:19 UTC) #13
Noel Gordon
+sky
6 years, 7 months ago (2014-05-07 06:21:22 UTC) #14
Noel Gordon
Built chrome-os and chrome-linux locally. Seems ui/views/widget/desktop_aura/desktop_screen_x11.h is used by both , and would be ...
6 years, 7 months ago (2014-05-07 06:42:56 UTC) #15
oshima
On 2014/05/05 15:10:19, Noel Gordon (Google) wrote: > On 2014/05/01 19:12:01, oshima wrote: > > ...
6 years, 7 months ago (2014-05-07 13:44:16 UTC) #16
Noel Gordon
On 2014/05/07 13:44:16, oshima wrote: > > > Do I have to create a native ...
6 years, 7 months ago (2014-05-07 15:07:24 UTC) #17
Noel Gordon
On 2014/05/07 13:44:16, oshima wrote: > > to get the profile, without reference to a ...
6 years, 7 months ago (2014-05-07 15:36:52 UTC) #18
Noel Gordon
> from a native view. I meant, given a native view, sorry.
6 years, 7 months ago (2014-05-07 15:41:55 UTC) #19
sky
https://codereview.chromium.org/263643004/diff/110001/ui/gfx/screen.h File ui/gfx/screen.h (right): https://codereview.chromium.org/263643004/diff/110001/ui/gfx/screen.h#newcode78 ui/gfx/screen.h:78: NativeView view, std::vector<char>* color_profile) const = 0; I agree ...
6 years, 7 months ago (2014-05-07 16:38:34 UTC) #20
Noel Gordon
On 2014/05/07 16:38:34, sky wrote: > What if view is NULL? Can a NULL view ...
6 years, 7 months ago (2014-05-09 13:59:38 UTC) #21
Noel Gordon
On 2014/05/07 16:38:34, sky wrote: > https://codereview.chromium.org/263643004/diff/110001/ui/gfx/screen.h > File ui/gfx/screen.h (right): > > https://codereview.chromium.org/263643004/diff/110001/ui/gfx/screen.h#newcode78 > ...
6 years, 7 months ago (2014-05-09 14:13:08 UTC) #22
sky
On Fri, May 9, 2014 at 6:59 AM, <noel@chromium.org> wrote: > On 2014/05/07 16:38:34, sky ...
6 years, 7 months ago (2014-05-09 15:10:58 UTC) #23
sky
On Fri, May 9, 2014 at 7:13 AM, <noel@chromium.org> wrote: > On 2014/05/07 16:38:34, sky ...
6 years, 7 months ago (2014-05-09 15:11:16 UTC) #24
oshima
In case you missed this comment: > If you really think color profile doesn't belong ...
6 years, 7 months ago (2014-05-09 17:06:06 UTC) #25
Noel Gordon
Thanks - thought I responded to it in #18 :)
6 years, 7 months ago (2014-05-12 14:35:32 UTC) #26
sky
On 2014/05/07 15:36:52, Noel Gordon (Google) wrote: > On 2014/05/07 13:44:16, oshima wrote: > > ...
6 years, 7 months ago (2014-05-12 16:20:37 UTC) #27
oshima
On 2014/05/12 16:20:37, sky wrote: > On 2014/05/07 15:36:52, Noel Gordon (Google) wrote: > > ...
6 years, 7 months ago (2014-05-12 18:53:42 UTC) #28
Ken Russell (switch to Gerrit)
On 2014/05/12 18:53:42, oshima wrote: > > Exactly. > > And if you agree that ...
6 years, 7 months ago (2014-05-13 03:28:12 UTC) #29
oshima
On 2014/05/13 03:28:12, Ken Russell wrote: > On 2014/05/12 18:53:42, oshima wrote: > > > ...
6 years, 7 months ago (2014-05-13 05:30:45 UTC) #30
Ken Russell (switch to Gerrit)
On 2014/05/13 05:30:45, oshima wrote: > On 2014/05/13 03:28:12, Ken Russell wrote: > > On ...
6 years, 7 months ago (2014-05-14 00:58:17 UTC) #31
oshima
On 2014/05/14 00:58:17, Ken Russell wrote: > On 2014/05/13 05:30:45, oshima wrote: > > On ...
6 years, 7 months ago (2014-05-14 01:08:06 UTC) #32
Noel Gordon
On 2014/05/14 00:58:17, Ken Russell wrote: > > oshima@ and I talked further offline and ...
6 years, 7 months ago (2014-05-14 03:26:56 UTC) #33
Noel Gordon
6 years, 7 months ago (2014-05-14 03:38:22 UTC) #34
On 2014/05/13 05:30:45, oshima wrote:
> On 2014/05/13 03:28:12, Ken Russell wrote:
> > On 2014/05/12 18:53:42, oshima wrote:
> > > 
> > > Exactly.
> > > 
> > > And if you agree that the color space is a property of the screen (I
assume
> > you
> > > meant NSScreen, which corresponds to gfx::Display in chrome),
> > > API should be either
> > > 
> > > gfx::Display::GetColorSpace
> > > 
> > > or
> > > 
> > > gfx:Screen::GetColorSpace(gfx::Display)
> > 
> > noel@ pointed out to me in an offline discussion that in crbug.com/352884
> there
> > was an attempt to make gfx::Screen more self-contained on Mac OS. It looks
> like
> > that work's stalled.
> > 
> > After thought, I agree that the best direction for this work would be to
> > associate the color profile with the Display. However, phrasing the API that
> way
> > and avoiding the use of NativeView in this CL will make fixing
> crbug.com/352884
> > a prerequisite. That seems a lot to ask given that others have tried and
> failed
> > to fix that other bug, that Noel is doing this work alone, and is
essentially
> > trying to land an already-working first sketch of display color profile
> support
> > behind a flag so others can contribute.
> > 
> > oshima, sky, can you please suggest a path forward for this work that you
> would
> > support? What about landing this work in its current form and requiring that
> the
> > underlying Screen APIs be restructured before it's enabled by default?
> 
> See my comment #2 in crbgu.com/352884. I said his solution is fine (esp the
> issue on osx side prevent us from doing the right thing). The issue in #4 does
> not seem to be relevant as this CL doesn't solve NULL window issue, and still
> assumes that the correct NSView with window should be passed. (correct me if
I'm
> wrong).

Correct, the issue in #4 is not something that gfx (or this patch) needs to
solve: it has to be solved above the gfx level.

> For deeper issue with the ID on mac, it is my understanding that Mac may
return
> different ID for internal display when external display is connected. 

and for extra spice, when the monitor disconnected and reconnected to the same
port.  I believe that the screen ID also changes when your monitor goes to sleep
and then later awoken.  mac screen ID's at OS-level seem to be ephemeral

>
(http://stackoverflow.com/questions/2861871/how-to-resolve-cgdirectdisplayid-c...)
> One solution is to assign fixed ID for internal display because it'll never
> change, and according to
>
https://developer.apple.com/library/mac/documentation/graphicsimaging/Concept...,
> you can get this info using CGDisplayIsBuiltin.

Powered by Google App Engine
This is Rietveld 408576698