| Index: ui/display/mac/screen_mac.mm
|
| diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
|
| index 08eb61de60974073d84899ef43147e11913b6d3d..366662805fe4fc80a777fe9dc272278068326cb6 100644
|
| --- a/ui/display/mac/screen_mac.mm
|
| +++ b/ui/display/mac/screen_mac.mm
|
| @@ -12,6 +12,7 @@
|
| #include <memory>
|
|
|
| #include "base/logging.h"
|
| +#include "base/mac/mac_util.h"
|
| #include "base/mac/sdk_forward_declarations.h"
|
| #include "base/macros.h"
|
| #include "base/timer/timer.h"
|
| @@ -76,8 +77,14 @@ Display GetDisplayForScreen(NSScreen* screen) {
|
|
|
| display.set_device_scale_factor(scale);
|
|
|
| - display.set_icc_profile(
|
| - gfx::ICCProfile::FromCGColorSpace([[screen colorSpace] CGColorSpace]));
|
| + // On Sierra, we need to operate in a single screen's color space because
|
| + // IOSurfaces do not opt-out of color correction.
|
| + // https://crbug.com/654488
|
| + CGColorSpaceRef color_space = [[screen colorSpace] CGColorSpace];
|
| + if (base::mac::IsAtLeastOS10_12())
|
| + color_space = base::mac::GetSystemColorSpace();
|
| +
|
| + display.set_icc_profile(gfx::ICCProfile::FromCGColorSpace(color_space));
|
| display.set_color_depth(NSBitsPerPixelFromDepth([screen depth]));
|
| display.set_depth_per_component(NSBitsPerSampleFromDepth([screen depth]));
|
| display.set_is_monochrome(CGDisplayUsesForceToGray());
|
|
|