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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 2490273004: Move cc::ClipNode::target_is_clipped to cc::EffectNode (Closed)
Patch Set: one more todo comment Created 4 years, 1 month 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/effect_node.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 6a0a0899f98e07b131ffcc368afd1492673e4ab6..75d597f333df62e1711dca90b556671e52acf03e 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -52,7 +52,6 @@ struct DataForRecursion {
bool affected_by_inner_viewport_bounds_delta;
bool affected_by_outer_viewport_bounds_delta;
bool should_flatten;
- bool target_is_clipped;
bool is_hidden;
uint32_t main_thread_scrolling_reasons;
bool scroll_tree_parent_created_by_uninheritable_criteria;
@@ -374,12 +373,15 @@ void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor,
// A surface with unclipped descendants cannot be clipped by its ancestor
// clip at draw time since the unclipped descendants aren't affected by the
// ancestor clip.
- data_for_children->target_is_clipped =
+ EffectNode* effect_node =
+ data_for_children->property_trees->effect_tree.Node(
+ data_for_children->render_target);
+ DCHECK(effect_node->owner_id == layer->id());
+ effect_node->surface_is_clipped =
ancestor_clips_subtree && !NumUnclippedDescendants(layer);
} else {
// Without a new render surface, layer clipping state from ancestors needs
// to continue to propagate.
- data_for_children->target_is_clipped = data_from_ancestor.target_is_clipped;
layers_are_clipped = ancestor_clips_subtree;
}
@@ -434,7 +436,6 @@ void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor,
else
node.clip_type = ClipNode::ClipType::NONE;
node.resets_clip = has_unclipped_surface;
- node.target_is_clipped = data_for_children->target_is_clipped;
node.layers_are_clipped = layers_are_clipped;
node.layers_are_clipped_when_surfaces_disabled =
layers_are_clipped_when_surfaces_disabled;
@@ -1389,7 +1390,6 @@ void BuildPropertyTreesTopLevelInternal(
data_for_recursion.affected_by_inner_viewport_bounds_delta = false;
data_for_recursion.affected_by_outer_viewport_bounds_delta = false;
data_for_recursion.should_flatten = false;
- data_for_recursion.target_is_clipped = false;
data_for_recursion.is_hidden = false;
data_for_recursion.main_thread_scrolling_reasons =
MainThreadScrollingReason::kNotScrollingOnMain;
« no previous file with comments | « cc/trees/effect_node.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698