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

Issue 2480583002: 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:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2883
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 Review-Url: https://codereview.chromium.org/2462283002 Cr-Commit-Position: refs/heads/master@{#428895} (cherry picked from commit 1f846bac3526dde2ba5384157fbfff49acdc9f47) Committed: https://chromium.googlesource.com/chromium/src/+/6596596075eb0b67b4bf908dc928f470b2d759af

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: 2 (1 generated)
ccameron
4 years, 1 month ago (2016-11-03 21:55:18 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6596596075eb0b67b4bf908dc928f470b2d759af.

Powered by Google App Engine
This is Rietveld 408576698