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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 953093002: cc: Derive draw opacity from property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make opacity tree-building optional Created 5 years, 10 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/draw_property_utils.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 7a3b5adbab102d8c5c52b7b095cb4d760ce0b534..e23895222ccfe8bcca924bb147cac78221b431a6 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2520,11 +2520,12 @@ void LayerTreeHostCommon::CalculateDrawProperties(
// will eventually get these data passed directly to the compositor.
TransformTree transform_tree;
ClipTree clip_tree;
+ OpacityTree opacity_tree;
ComputeVisibleRectsUsingPropertyTrees(
inputs->root_layer, inputs->page_scale_application_layer,
inputs->page_scale_factor, inputs->device_scale_factor,
gfx::Rect(inputs->device_viewport_size), inputs->device_transform,
- &transform_tree, &clip_tree);
+ &transform_tree, &clip_tree, &opacity_tree);
LayerIterator<Layer> it, end;
for (it = LayerIterator<Layer>::Begin(inputs->render_surface_layer_list),
@@ -2543,6 +2544,11 @@ void LayerTreeHostCommon::CalculateDrawProperties(
current_layer->draw_transform(),
current_layer->draw_transform_from_property_trees(transform_tree));
CHECK(draw_transforms_match);
+
+ const bool draw_opacities_match =
+ current_layer->draw_opacity() ==
+ current_layer->DrawOpacityFromPropertyTrees(opacity_tree);
+ CHECK(draw_opacities_match);
}
}
}
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698