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

Unified Diff: ui/compositor/compositor.cc

Issue 2950183002: color: Use ICCProfile from display::Display instead of FromBestMonitor (Closed)
Patch Set: Use forced color profile in display::Display ctor 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/display/display.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 4303f63eabae0130f90ed3ca127abdd4f50ed809..01c52ef4a4cc7f059ac53ee17b7255fd4d1c02e8 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -316,14 +316,14 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
}
}
-void Compositor::SetDisplayColorProfile(const gfx::ICCProfile& icc_profile) {
- blending_color_space_ = icc_profile.GetColorSpace();
+void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
+ blending_color_space_ = color_space;
output_color_space_ = blending_color_space_;
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) {
blending_color_space_ = gfx::ColorSpace::CreateExtendedSRGB();
output_color_space_ = gfx::ColorSpace::CreateSCRGBLinear();
}
- host_->SetRasterColorSpace(icc_profile.GetParametricColorSpace());
+ host_->SetRasterColorSpace(color_space.GetParametricApproximation());
// Color space is reset when the output surface is lost, so this must also be
// updated then.
// TODO(fsamuel): Get rid of this.
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/display/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698