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

Issue 2462283002: Mac: Workaround IOSurface color behavior change in 10.12 (Closed)

Created:
4 years, 1 month ago by ccameron
Modified:
4 years, 1 month ago
Reviewers:
erikchen
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, mac-reviews_chromium.org, James Su
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/1f846bac3526dde2ba5384157fbfff49acdc9f47 Cr-Commit-Position: refs/heads/master@{#428895}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -6 lines) Patch
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 chunk +7 lines, -1 line 0 comments Download
M ui/display/mac/screen_mac.mm View 2 chunks +9 lines, -2 lines 0 comments Download
M ui/gfx/mac/io_surface.cc View 1 chunk +16 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (12 generated)
ccameron
There is discussion and testing of this approach in https://bugs.chromium.org/p/chromium/issues/detail?id=654488 The fix isn't great, but ...
4 years, 1 month ago (2016-10-31 23:08:59 UTC) #6
erikchen
lgtm
4 years, 1 month ago (2016-10-31 23:16:08 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2462283002/1
4 years, 1 month ago (2016-11-01 01:10:14 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-01 01:15:34 UTC) #15
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 01:18:25 UTC) #17
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/1f846bac3526dde2ba5384157fbfff49acdc9f47
Cr-Commit-Position: refs/heads/master@{#428895}

Powered by Google App Engine
This is Rietveld 408576698