Mac OS Sierra: Image color correction is double-applied |
|||||||
Issue descriptionAs noted in issue 633805 , Sierra assumes that remotely-hosted CALayers backed by untagged IOSurfaces are in sRGB color space. Prior to sierra, these were assumed to be in display device color space (whichever space that would happen to be). We currently decode images into the device color space, assuming that the compositor will apply no color correction. This assumption is now invalid, and we will beg sRGB->(device color space) conversion, unless we explicitly tag the IOSurface. Consider the attached screenshot. The macaw image is in ACES color space, and the display color space is ACES. In the upper-right, in Preview, is the way it should look. In the upper-left is how it looks on Chrome. It is dark because CoreAnimation did a not-asked-for sRGB->ACES color conversion. A comprehensive fix for this is complicated (and being worked on, hopefully launching soon). In the mean time, a reasonable fix is to just tag all IOSurfaces as being in the output monitor color space. For multi-monitor systems, this will be wrong (but it is already), and hopefully won't become any "more wrong".
,
Oct 11 2016
Hey Chris - for completeness, is the bottom-middle image one on a build of Chrome with your proposed reasonable fix of tagging all IOSurfaces as being in the output monitor color space?
,
Oct 11 2016
Yes, exactly -- the bottom one is the proposed fix.
,
Nov 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f846bac3526dde2ba5384157fbfff49acdc9f47 commit 1f846bac3526dde2ba5384157fbfff49acdc9f47 Author: ccameron <ccameron@chromium.org> Date: Tue Nov 01 01:15:07 2016 Mac: Workaround IOSurface color behavior change in 10.12 IOSurface color handling for remote layers changed in Sierra. Prior to sierra, these were assumed to be in the display device color space of whichever monitor they appeared on (that is, no color conversion was applied). We currently decode images into what we guess to be the device color space (initialized once at renderer process create time), and assume that the image will appear on that monitor and that the compositor will apply no color correction. This assumption is now invalid, and we will get sRGB->(device color space) conversion, unless we explicitly tag the IOSurface. A comprehensive fix for this is complicated (working on it). In the mean time, force image decode to be done in base::mac::GetSystemColorSpace, and tag all IOSurfaces as being in base::mac::GetSystemColorSpace. Note that base::mac::GetSystemColorSpace is static for the duration of the process it is called from. In this fix we call base::mac::GetSystemColorSpace in the browser and GPU processes and hope that they are in sync (the only time they won't be is if the GPU process crashes and the monitor configuration changed in the mean time). Also of note is that I tried changing GetSystemColorSpace to get the "deepest" screen's color space, but that did not correspond to the space with the widest gamut, so I left it as-is. BUG= 654488 Review-Url: https://codereview.chromium.org/2462283002 Cr-Commit-Position: refs/heads/master@{#428895} [modify] https://crrev.com/1f846bac3526dde2ba5384157fbfff49acdc9f47/content/browser/renderer_host/render_widget_host_view_mac.mm [modify] https://crrev.com/1f846bac3526dde2ba5384157fbfff49acdc9f47/ui/display/mac/screen_mac.mm [modify] https://crrev.com/1f846bac3526dde2ba5384157fbfff49acdc9f47/ui/gfx/mac/io_surface.cc
,
Nov 2 2016
Requesting Merge to 55
,
Nov 2 2016
,
Nov 2 2016
Your change meets the bar and is auto-approved for M55 (branch: 2883)
,
Nov 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6596596075eb0b67b4bf908dc928f470b2d759af commit 6596596075eb0b67b4bf908dc928f470b2d759af Author: Christopher Cameron <ccameron@chromium.org> Date: Thu Nov 03 21:50:58 2016 Mac: Workaround IOSurface color behavior change in 10.12 IOSurface color handling for remote layers changed in Sierra. Prior to sierra, these were assumed to be in the display device color space of whichever monitor they appeared on (that is, no color conversion was applied). We currently decode images into what we guess to be the device color space (initialized once at renderer process create time), and assume that the image will appear on that monitor and that the compositor will apply no color correction. This assumption is now invalid, and we will get sRGB->(device color space) conversion, unless we explicitly tag the IOSurface. A comprehensive fix for this is complicated (working on it). In the mean time, force image decode to be done in base::mac::GetSystemColorSpace, and tag all IOSurfaces as being in base::mac::GetSystemColorSpace. Note that base::mac::GetSystemColorSpace is static for the duration of the process it is called from. In this fix we call base::mac::GetSystemColorSpace in the browser and GPU processes and hope that they are in sync (the only time they won't be is if the GPU process crashes and the monitor configuration changed in the mean time). Also of note is that I tried changing GetSystemColorSpace to get the "deepest" screen's color space, but that did not correspond to the space with the widest gamut, so I left it as-is. BUG= 654488 Review-Url: https://codereview.chromium.org/2462283002 Cr-Commit-Position: refs/heads/master@{#428895} (cherry picked from commit 1f846bac3526dde2ba5384157fbfff49acdc9f47) Review URL: https://codereview.chromium.org/2480583002 . Cr-Commit-Position: refs/branch-heads/2883@{#446} Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768} [modify] https://crrev.com/6596596075eb0b67b4bf908dc928f470b2d759af/content/browser/renderer_host/render_widget_host_view_mac.mm [modify] https://crrev.com/6596596075eb0b67b4bf908dc928f470b2d759af/ui/display/mac/screen_mac.mm [modify] https://crrev.com/6596596075eb0b67b4bf908dc928f470b2d759af/ui/gfx/mac/io_surface.cc
,
Nov 9 2016
Tested the issue on MacBook Retina using chrome version 55.0.2883.44 with the URL http://angled-edges.josephfus.co/ from the attached bug 633805 . Observed no rendering issues in the page. Observing same behavior on reported version as well. please provide us any constant repro steps or sample URL to verify this issue from test team end. Thanks,
,
Nov 9 2016
This is fixed. Any image with an embedded color profile will cause the bug to appear, but it is necessary to set the system color profile to something noticeably different (e.g, ACES).
,
Feb 23 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ccameron@chromium.org
, Oct 10 2016278 KB
278 KB View Download