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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 1800923002: cc: Directly use property trees to calculate clip rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix perftests compile by not verify clip tree calc there Created 4 years, 7 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 d46d8692dec3c3a0872e637e5a695230d05b4330..b7abfb76786db5d9d019b3e05dc344e0c36d3d90 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -26,6 +26,7 @@ namespace {
static const int kInvalidPropertyTreeNodeId = -1;
static const int kRootPropertyTreeNodeId = 0;
+static const int kViewportClipTreeNodeId = 1;
template <typename LayerType>
struct DataForRecursion {
@@ -848,6 +849,8 @@ bool AddEffectNodeIfNeeded(
// transform id.
node.data.transform_id =
data_from_ancestor.transform_tree->next_available_id();
+ node.data.has_unclipped_descendants =
+ (NumUnclippedDescendants(layer) != 0);
}
node.data.clip_id = data_from_ancestor.clip_tree_parent;
} else {
@@ -856,7 +859,7 @@ bool AddEffectNodeIfNeeded(
// factor) and clip node created from root layer (include viewports) applies
// to root render surface's content, but not root render surface itself.
node.data.transform_id = kRootPropertyTreeNodeId;
- node.data.clip_id = kRootPropertyTreeNodeId;
+ node.data.clip_id = kViewportClipTreeNodeId;
}
data_for_children->effect_tree_parent =
data_for_children->effect_tree->Insert(node, parent_id);
« 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