| OLD | NEW |
| 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/ClipPaintPropertyNode.h" | 5 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| 6 | 6 |
| 7 #include "platform/geometry/LayoutRect.h" | 7 #include "platform/geometry/LayoutRect.h" |
| 8 #include "platform/graphics/paint/PropertyTreeState.h" | |
| 9 | 8 |
| 10 namespace blink { | 9 namespace blink { |
| 11 | 10 |
| 12 ClipPaintPropertyNode* ClipPaintPropertyNode::root() { | 11 ClipPaintPropertyNode* ClipPaintPropertyNode::root() { |
| 13 DEFINE_STATIC_REF(ClipPaintPropertyNode, root, | 12 DEFINE_STATIC_REF(ClipPaintPropertyNode, root, |
| 14 (ClipPaintPropertyNode::create( | 13 (ClipPaintPropertyNode::create( |
| 15 nullptr, TransformPaintPropertyNode::root(), | 14 nullptr, TransformPaintPropertyNode::root(), |
| 16 FloatRoundedRect(LayoutRect::infiniteIntRect())))); | 15 FloatRoundedRect(LayoutRect::infiniteIntRect())))); |
| 17 return root; | 16 return root; |
| 18 } | 17 } |
| 19 | 18 |
| 20 String ClipPaintPropertyNode::toString() const { | 19 String ClipPaintPropertyNode::toString() const { |
| 21 return String::format( | 20 return String::format( |
| 22 "parent=%p localTransformSpace=%p rect=%s directCompositingReasons=%s", | 21 "parent=%p localTransformSpace=%p rect=%s directCompositingReasons=%s", |
| 23 m_parent.get(), m_localTransformSpace.get(), | 22 m_parent.get(), m_localTransformSpace.get(), |
| 24 m_clipRect.toString().ascii().data(), | 23 m_clipRect.toString().ascii().data(), |
| 25 compositingReasonsAsString(m_directCompositingReasons).ascii().data()); | 24 compositingReasonsAsString(m_directCompositingReasons).ascii().data()); |
| 26 } | 25 } |
| 27 | 26 |
| 28 #if DCHECK_IS_ON() | |
| 29 | |
| 30 String ClipPaintPropertyNode::toTreeString() const { | |
| 31 return blink::PropertyTreeStatePrinter<blink::ClipPaintPropertyNode>() | |
| 32 .pathAsString(this); | |
| 33 } | |
| 34 | |
| 35 #endif | |
| 36 | |
| 37 } // namespace blink | 27 } // namespace blink |
| OLD | NEW |