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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 1624693004: cc:: Add transform nodes at boundaries of 3d rendering contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/property_tree.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 8af9eb8a6c41a46666c8a4cc1438af6a0b59877a..1f9e6e376bea768cf1445c713f8040b535bfe6f3 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -232,10 +232,15 @@ bool AddTransformNodeIfNeeded(
layer->parent()->effect_tree_index() !=
layer->scroll_parent()->effect_tree_index();
+ const bool is_at_boundary_of_3d_rendering_context =
+ layer->parent()
+ ? layer->parent()->sorting_context_id() != layer->sorting_context_id()
+ : layer->Is3dSorted();
bool requires_node = is_root || is_scrollable || has_significant_transform ||
has_any_transform_animation || has_surface || is_fixed ||
is_page_scale_layer || is_overscroll_elasticity_layer ||
- scroll_child_has_different_target;
+ scroll_child_has_different_target ||
+ is_at_boundary_of_3d_rendering_context;
LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer);
DCHECK(is_root || transform_parent);
@@ -312,6 +317,8 @@ bool AddTransformNodeIfNeeded(
node->data.scrolls = is_scrollable;
node->data.flattens_inherited_transform = data_for_children->should_flatten;
+ node->data.sorting_context_id = layer->sorting_context_id();
+
if (layer == data_from_ancestor.page_scale_layer)
data_for_children->in_subtree_of_page_scale_layer = true;
node->data.in_subtree_of_page_scale_layer =
« no previous file with comments | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698