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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit
Patch Set: rebase 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 | « cc/layers/picture_layer_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 757858212c9674c59d8d6aa38975d3633149a17b..180dd403172d8d5d330dedbb003ac11420b390c5 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -444,11 +444,21 @@ static bool LayerNeedsUpdateInternal(LayerType* layer,
return true;
}
+static inline bool IsHidden(Layer* layer) {
+ return layer->is_hidden();
+}
+
+static inline bool IsHidden(LayerImpl* layer) {
+ return false;
+}
+
template <typename LayerType>
static inline bool LayerShouldBeSkippedInternal(
LayerType* layer,
const TransformTree& transform_tree,
const EffectTree& effect_tree) {
+ if (IsHidden(layer))
+ return true;
const TransformNode* transform_node =
transform_tree.Node(layer->transform_tree_index());
const EffectNode* effect_node = effect_tree.Node(layer->effect_tree_index());
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698