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

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

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens 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/TransformPaintPropertyNode.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp
index 7796b1a9d2432afde6d1ed8e6cae2a7ae308cb27..4e86f406f69aa50385975341f38500c4a2d8befe 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.cpp
@@ -8,17 +8,19 @@
namespace blink {
+// The root of the transform tree. The root transform node references the root
+// scroll node.
TransformPaintPropertyNode* TransformPaintPropertyNode::root() {
DEFINE_STATIC_REF(TransformPaintPropertyNode, root,
- (TransformPaintPropertyNode::create(
- nullptr, TransformationMatrix(), FloatPoint3D(),
+ adoptRef(new TransformPaintPropertyNode(
+ nullptr, TransformationMatrix(), FloatPoint3D(), false,
+ 0, CompositingReasonNone, CompositorElementId(),
ScrollPaintPropertyNode::root())));
return root;
}
-// TODO(pdr): print out scroll node information.
String TransformPaintPropertyNode::toString() const {
- return String::format(
+ auto transform = String::format(
"parent=%p transform=%s origin=%s flattensInheritedTransform=%s "
"renderingContextId=%x directCompositingReasons=%s "
"compositorElementId=(%d, %d)",
@@ -27,6 +29,9 @@ String TransformPaintPropertyNode::toString() const {
m_flattensInheritedTransform ? "yes" : "no", m_renderingContextId,
compositingReasonsAsString(m_directCompositingReasons).ascii().data(),
m_compositorElementId.primaryId, m_compositorElementId.secondaryId);
+ if (m_scroll)
+ return transform + " scroll=" + m_scroll->toString();
+ return transform;
}
#if DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698