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

Unified Diff: ui/display/mac/screen_mac.mm

Issue 2325773003: cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: Make public_deps instead of deps Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/display/display.h ('K') | « ui/display/display.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« ui/display/display.h ('K') | « ui/display/display.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698