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

Side by Side 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: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 5 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
6 6
7 #include "platform/graphics/paint/PropertyTreeState.h" 7 #include "platform/graphics/paint/PropertyTreeState.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 TransformPaintPropertyNode* TransformPaintPropertyNode::root() { 11 TransformPaintPropertyNode* TransformPaintPropertyNode::root() {
12 DEFINE_STATIC_REF(TransformPaintPropertyNode, root, 12 DEFINE_STATIC_REF(TransformPaintPropertyNode, root,
13 (TransformPaintPropertyNode::create( 13 (TransformPaintPropertyNode::create(
14 nullptr, TransformationMatrix(), FloatPoint3D(), 14 nullptr, TransformationMatrix(), FloatPoint3D(),
15 ScrollPaintPropertyNode::root()))); 15 ScrollPaintPropertyNode::root())));
16 return root; 16 return root;
17 } 17 }
18 18
19 // TODO(pdr): print out scroll node information.
20 String TransformPaintPropertyNode::toString() const { 19 String TransformPaintPropertyNode::toString() const {
21 return String::format( 20 auto transform = String::format(
22 "parent=%p transform=%s origin=%s flattensInheritedTransform=%s " 21 "parent=%p transform=%s origin=%s flattensInheritedTransform=%s "
23 "renderingContextId=%x directCompositingReasons=%s " 22 "renderingContextId=%x directCompositingReasons=%s "
24 "compositorElementId=(%d, %d)", 23 "compositorElementId=(%d, %d)",
25 m_parent.get(), m_matrix.toString().ascii().data(), 24 m_parent.get(), m_matrix.toString().ascii().data(),
26 m_origin.toString().ascii().data(), 25 m_origin.toString().ascii().data(),
27 m_flattensInheritedTransform ? "yes" : "no", m_renderingContextId, 26 m_flattensInheritedTransform ? "yes" : "no", m_renderingContextId,
28 compositingReasonsAsString(m_directCompositingReasons).ascii().data(), 27 compositingReasonsAsString(m_directCompositingReasons).ascii().data(),
29 m_compositorElementId.primaryId, m_compositorElementId.secondaryId); 28 m_compositorElementId.primaryId, m_compositorElementId.secondaryId);
29 if (m_scroll)
30 return transform + " scroll=" + m_scroll->toString();
31 return transform;
30 } 32 }
31 33
32 #if DCHECK_IS_ON() 34 #if DCHECK_IS_ON()
33 35
34 String TransformPaintPropertyNode::toTreeString() const { 36 String TransformPaintPropertyNode::toTreeString() const {
35 return blink::PropertyTreeStatePrinter<blink::TransformPaintPropertyNode>() 37 return blink::PropertyTreeStatePrinter<blink::TransformPaintPropertyNode>()
36 .pathAsString(this); 38 .pathAsString(this);
37 } 39 }
38 40
39 #endif 41 #endif
40 42
41 } // namespace blink 43 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698