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

Unified Diff: cc/trees/layer_tree.cc

Issue 2336853002: cc: Plumb device color space through to rasterization (Closed)
Patch Set: Remove damage 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
« no previous file with comments | « cc/trees/layer_tree.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree.cc
diff --git a/cc/trees/layer_tree.cc b/cc/trees/layer_tree.cc
index 72460a4154e671886ea592e6b1ce2e3e785e6d53..b6ce2d29d2bedf48488deb58cda10e2095b125ff 100644
--- a/cc/trees/layer_tree.cc
+++ b/cc/trees/layer_tree.cc
@@ -230,6 +230,14 @@ void LayerTree::SetPaintedDeviceScaleFactor(float painted_device_scale_factor) {
SetNeedsCommit();
}
+void LayerTree::SetDeviceColorSpace(const gfx::ColorSpace& device_color_space) {
+ if (inputs_.device_color_space == device_color_space)
+ return;
+ inputs_.device_color_space = device_color_space;
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
+ this, [](Layer* layer) { layer->SetNeedsDisplay(); });
+}
+
void LayerTree::RegisterLayer(Layer* layer) {
DCHECK(!LayerById(layer->id()));
DCHECK(!in_paint_layer_contents_);
@@ -408,6 +416,8 @@ void LayerTree::PushPropertiesTo(LayerTreeImpl* tree_impl) {
tree_impl->set_painted_device_scale_factor(
inputs_.painted_device_scale_factor);
+ tree_impl->SetDeviceColorSpace(inputs_.device_color_space);
+
if (inputs_.pending_page_scale_animation) {
tree_impl->SetPendingPageScaleAnimation(
std::move(inputs_.pending_page_scale_animation));
« no previous file with comments | « cc/trees/layer_tree.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698