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

Unified Diff: ui/display/display.cc

Issue 2950183002: color: Use ICCProfile from display::Display instead of FromBestMonitor (Closed)
Patch Set: Created 3 years, 6 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
Index: ui/display/display.cc
diff --git a/ui/display/display.cc b/ui/display/display.cc
index 4ec8ea0d063f2cdd1f66b41838e7577281b87f43..cdcb02ea9263da1768471bcddf82b041746da6b5 100644
--- a/ui/display/display.cc
+++ b/ui/display/display.cc
@@ -114,6 +114,11 @@ Display::Display(int64_t id, const gfx::Rect& bounds)
color_depth_ = HDR_BITS_PER_PIXEL;
depth_per_component_ = HDR_BITS_PER_COMPONENT;
}
+ // TODO(ccameron): Populate this in platform-specific code.
+ icc_profile_ = gfx::ICCProfile::FromBestMonitor();
+ if (!icc_profile_.IsValid())
+ icc_profile_ = gfx::ICCProfile::CreateSRGB();
+
#if defined(USE_AURA)
SetScaleAndBounds(device_scale_factor_, bounds);
#endif

Powered by Google App Engine
This is Rietveld 408576698