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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 1231453002: Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DrawProperties is_clipped removed Created 5 years, 5 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
« cc/trees/layer_tree_impl_unittest.cc ('K') | « cc/trees/occlusion_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_builder.cc
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 28ad43f309111ac26e9eb433bc3e5acaf11f6500..48f68f7d3eb3cb7daf7253669ee543aa24862ff9 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -100,7 +100,9 @@ void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor,
int parent_id = parent->id;
bool ancestor_clips_subtree =
- data_from_ancestor.ancestor_clips_subtree || layer->clip_parent();
+ data_from_ancestor.ancestor_clips_subtree ||
+ (layer->clip_parent() &&
+ layer->clip_parent()->is_clipped_from_property_tree());
ajuma 2015/07/09 14:50:15 This looks like a logic change (since we're now ch
jaydasika 2015/07/09 15:11:49 Yes. LayerTreeHostCommonTest.LayerTreeRebuildTest
data_for_children->ancestor_clips_subtree = false;
bool has_unclipped_surface = false;
@@ -145,6 +147,9 @@ void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor,
layer->SetClipTreeIndex(
has_unclipped_surface ? 0 : data_for_children->clip_tree_parent);
+ layer->set_is_clipped_from_property_tree(
+ data_for_children->ancestor_clips_subtree);
+
// TODO(awoloszyn): Right now when we hit a node with a replica, we reset the
// clip for all children since we may need to draw. We need to figure out a
// better way, since we will need both the clipped and unclipped versions.
« cc/trees/layer_tree_impl_unittest.cc ('K') | « cc/trees/occlusion_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698