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

Unified Diff: ui/compositor/compositor.cc

Issue 2742613002: color: Always use parametric color spaces for raster (Closed)
Patch Set: Incorporate review feedback Created 3 years, 9 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/gfx/color_space.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 a80a83bb7f8f6adda62e455cd8e86f4fa9f94240..19b0371f1c9e41d5fa4d133e7379929bd6dd34b9 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -41,6 +41,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator_collection.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
+#include "ui/gfx/icc_profile.h"
#include "ui/gl/gl_switches.h"
namespace {
@@ -354,15 +355,15 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
}
}
-void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
- blending_color_space_ = color_space;
- output_color_space_ = color_space;
+void Compositor::SetDisplayColorProfile(const gfx::ICCProfile& icc_profile) {
+ blending_color_space_ = icc_profile.GetColorSpace();
+ output_color_space_ = blending_color_space_;
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableHDROutput)) {
blending_color_space_ = gfx::ColorSpace::CreateExtendedSRGB();
output_color_space_ = gfx::ColorSpace::CreateSCRGBLinear();
}
- host_->SetRasterColorSpace(color_space);
+ host_->SetRasterColorSpace(icc_profile.GetParametricColorSpace());
// 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/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698