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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp

Issue 2637383006: Set layer element id when building layers in PaintArtifactCompositor. (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
index 8f2317a75fc1dba07ef262829306ce000d3fb0de..c20a0f0cfdafbb0b30d11b613b67d0758e711c92 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
@@ -29,6 +29,19 @@ bool isAncestorOf(const PropertyNode* ancestor, const PropertyNode* child) {
return child == ancestor;
}
+const CompositorElementId PropertyTreeState::compositorElementId() const {
+ // Zero or more of the scroll, effect or transform nodes could have a
+ // compositor element id. The order doesn't matter as the element id should be
+ // the same on all that have a non-default CompositorElementId.
ajuma 2017/01/20 15:07:46 Is it worth DCHECK-ing that this holds?
wkorman 2017/01/20 22:13:56 Done.
+ if (effect()->compositorElementId())
+ return effect()->compositorElementId();
+ if (scroll()->compositorElementId())
+ return scroll()->compositorElementId();
+ if (transform()->compositorElementId())
+ return transform()->compositorElementId();
+ return CompositorElementId();
+}
+
PropertyTreeState::InnermostNode PropertyTreeState::innermostNode() const {
// TODO(chrishtr): this is very inefficient when innermostNode() is called
// repeatedly.

Powered by Google App Engine
This is Rietveld 408576698