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

Unified Diff: cc/surfaces/display.cc

Issue 2728173004: HDR: Do nonlinear blending in the compositor (Closed)
Patch Set: Fix windows build 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 | « cc/surfaces/display.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index f56de857d78ead01255e991fec971896e91d9ae0..86e376915801bebd29fa02ba48f0854084683d20 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -159,10 +159,13 @@ void Display::Resize(const gfx::Size& size) {
scheduler_->DisplayResized();
}
-void Display::SetColorSpace(const gfx::ColorSpace& color_space) {
- device_color_space_ = color_space;
- if (aggregator_)
- aggregator_->SetOutputColorSpace(device_color_space_);
+void Display::SetColorSpace(const gfx::ColorSpace& blending_color_space,
+ const gfx::ColorSpace& device_color_space) {
+ blending_color_space_ = blending_color_space;
+ device_color_space_ = device_color_space;
+ if (aggregator_) {
+ aggregator_->SetOutputColorSpace(blending_color_space, device_color_space_);
+ }
}
void Display::SetOutputIsSecure(bool secure) {
@@ -219,7 +222,7 @@ void Display::InitializeRenderer() {
aggregator_.reset(new SurfaceAggregator(
surface_manager_, resource_provider_.get(), output_partial_list));
aggregator_->set_output_is_secure(output_is_secure_);
- aggregator_->SetOutputColorSpace(device_color_space_);
+ aggregator_->SetOutputColorSpace(blending_color_space_, device_color_space_);
}
void Display::UpdateRootSurfaceResourcesLocked() {
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698