Index: ui/display/mac/screen_mac.mm |
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm |
index 4621dfabc766680ad8cf21748b11d791ba9678e8..c36a4c864ed75978245db131fbe9ea2fd0e24b4f 100644 |
--- a/ui/display/mac/screen_mac.mm |
+++ b/ui/display/mac/screen_mac.mm |
@@ -71,6 +71,12 @@ Display GetDisplayForScreen(NSScreen* screen) { |
scale = Display::GetForcedDeviceScaleFactor(); |
display.set_device_scale_factor(scale); |
+ |
+ display.set_icc_profile( |
+ gfx::ICCProfile::FromCGColorSpace([[screen colorSpace] CGColorSpace])); |
+ display.set_color_depth(NSBitsPerPixelFromDepth([screen depth])); |
+ display.set_depth_per_component(NSBitsPerSampleFromDepth([screen depth])); |
+ |
// CGDisplayRotation returns a double. Display::SetRotationAsDegree will |
// handle the unexpected situations were the angle is not a multiple of 90. |
display.SetRotationAsDegree(static_cast<int>(CGDisplayRotation(display_id))); |