| 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/PropertyTreeState.h" | 5 #include "platform/graphics/paint/PropertyTreeState.h" |
| 6 | 6 |
| 7 #include "platform/graphics/paint/GeometryMapper.h" | 7 #include "platform/graphics/paint/GeometryMapper.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #endif | 52 #endif |
| 53 if (effect()->compositorElementId()) | 53 if (effect()->compositorElementId()) |
| 54 return effect()->compositorElementId(); | 54 return effect()->compositorElementId(); |
| 55 if (scroll()->compositorElementId()) | 55 if (scroll()->compositorElementId()) |
| 56 return scroll()->compositorElementId(); | 56 return scroll()->compositorElementId(); |
| 57 if (transform()->compositorElementId()) | 57 if (transform()->compositorElementId()) |
| 58 return transform()->compositorElementId(); | 58 return transform()->compositorElementId(); |
| 59 return CompositorElementId(); | 59 return CompositorElementId(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool PropertyTreeState::equivalentGeometry( |
| 63 const PropertyTreeState& other) const { |
| 64 return transform() == other.transform() && clip() == other.clip() && |
| 65 effect() == other.effect(); |
| 66 } |
| 67 |
| 62 PropertyTreeState::InnermostNode PropertyTreeState::innermostNode() const { | 68 PropertyTreeState::InnermostNode PropertyTreeState::innermostNode() const { |
| 63 // TODO(chrishtr): this is very inefficient when innermostNode() is called | 69 // TODO(chrishtr): this is very inefficient when innermostNode() is called |
| 64 // repeatedly. | 70 // repeatedly. |
| 65 bool clipTransformStrictAncestorOfTransform = | 71 bool clipTransformStrictAncestorOfTransform = |
| 66 m_clip->localTransformSpace() != m_transform.get() && | 72 m_clip->localTransformSpace() != m_transform.get() && |
| 67 isAncestorOf<TransformPaintPropertyNode>(m_clip->localTransformSpace(), | 73 isAncestorOf<TransformPaintPropertyNode>(m_clip->localTransformSpace(), |
| 68 m_transform.get()); | 74 m_transform.get()); |
| 69 bool effectTransformStrictAncestorOfTransform = | 75 bool effectTransformStrictAncestorOfTransform = |
| 70 m_effect->localTransformSpace() != m_transform.get() && | 76 m_effect->localTransformSpace() != m_transform.get() && |
| 71 isAncestorOf<TransformPaintPropertyNode>(m_effect->localTransformSpace(), | 77 isAncestorOf<TransformPaintPropertyNode>(m_effect->localTransformSpace(), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 #if DCHECK_IS_ON() | 112 #if DCHECK_IS_ON() |
| 107 | 113 |
| 108 String PropertyTreeState::toTreeString() const { | 114 String PropertyTreeState::toTreeString() const { |
| 109 return transform()->toTreeString() + "\n" + clip()->toTreeString() + "\n" + | 115 return transform()->toTreeString() + "\n" + clip()->toTreeString() + "\n" + |
| 110 effect()->toTreeString() + "\n" + scroll()->toTreeString(); | 116 effect()->toTreeString() + "\n" + scroll()->toTreeString(); |
| 111 } | 117 } |
| 112 | 118 |
| 113 #endif | 119 #endif |
| 114 | 120 |
| 115 } // namespace blink | 121 } // namespace blink |
| OLD | NEW |