| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef PaintInvalidationState_h | 5 #ifndef PaintInvalidationState_h |
| 6 #define PaintInvalidationState_h | 6 #define PaintInvalidationState_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/geometry/LayoutRect.h" | 9 #include "platform/geometry/LayoutRect.h" |
| 10 #include "platform/transforms/AffineTransform.h" | 10 #include "platform/transforms/AffineTransform.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Returns the rect bounds needed to invalidate paint of this object, | 68 // Returns the rect bounds needed to invalidate paint of this object, |
| 69 // in the space of paint invalidation backing. | 69 // in the space of paint invalidation backing. |
| 70 LayoutRect computePaintInvalidationRectInBacking() const; | 70 LayoutRect computePaintInvalidationRectInBacking() const; |
| 71 | 71 |
| 72 void mapLocalRectToPaintInvalidationBacking(LayoutRect&) const; | 72 void mapLocalRectToPaintInvalidationBacking(LayoutRect&) const; |
| 73 | 73 |
| 74 // Records |obj| as needing paint invalidation on the next frame. See the de
finition of PaintInvalidationDelayedFull for more details. | 74 // Records |obj| as needing paint invalidation on the next frame. See the de
finition of PaintInvalidationDelayedFull for more details. |
| 75 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) const { m_pending
DelayedPaintInvalidations.append(&obj); } | 75 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) const { m_pending
DelayedPaintInvalidations.append(&obj); } |
| 76 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() const { retu
rn m_pendingDelayedPaintInvalidations; } | 76 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() const { retu
rn m_pendingDelayedPaintInvalidations; } |
| 77 | 77 |
| 78 PaintLayer& enclosingSelfPaintingLayer(const LayoutObject&) const; | 78 PaintLayer& paintingLayer() const; |
| 79 | 79 |
| 80 #if ENABLE(ASSERT) | 80 #if ENABLE(ASSERT) |
| 81 const LayoutObject& currentObject() const { return m_currentObject; } | 81 const LayoutObject& currentObject() const { return m_currentObject; } |
| 82 #endif | 82 #endif |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 friend class VisualRectMappingTest; | 85 friend class VisualRectMappingTest; |
| 86 | 86 |
| 87 void mapLocalRectToPaintInvalidationContainer(LayoutRect&) const; | 87 void mapLocalRectToPaintInvalidationContainer(LayoutRect&) const; |
| 88 | 88 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 const LayoutObject& m_containerForAbsolutePosition; | 131 const LayoutObject& m_containerForAbsolutePosition; |
| 132 | 132 |
| 133 // Transform from the initial viewport coordinate system of an outermost | 133 // Transform from the initial viewport coordinate system of an outermost |
| 134 // SVG root to the userspace _before_ the relevant element. Combining this | 134 // SVG root to the userspace _before_ the relevant element. Combining this |
| 135 // with |m_paintOffset| yields the "final" offset. | 135 // with |m_paintOffset| yields the "final" offset. |
| 136 AffineTransform m_svgTransform; | 136 AffineTransform m_svgTransform; |
| 137 | 137 |
| 138 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations; | 138 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations; |
| 139 | 139 |
| 140 PaintLayer& m_enclosingSelfPaintingLayer; | 140 PaintLayer& m_paintingLayer; |
| 141 | 141 |
| 142 #if ENABLE(ASSERT) | 142 #if ENABLE(ASSERT) |
| 143 bool m_didUpdateForChildren; | 143 bool m_didUpdateForChildren; |
| 144 #endif | 144 #endif |
| 145 | 145 |
| 146 #if ENABLE(ASSERT) && !defined(NDEBUG) | 146 #if ENABLE(ASSERT) && !defined(NDEBUG) |
| 147 // #define CHECK_FAST_PATH_SLOW_PATH_EQUALITY | 147 // #define CHECK_FAST_PATH_SLOW_PATH_EQUALITY |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY | 150 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY |
| 151 void assertFastPathAndSlowPathRectsEqual(const LayoutRect& fastPathRect, con
st LayoutRect& slowPathRect) const; | 151 void assertFastPathAndSlowPathRectsEqual(const LayoutRect& fastPathRect, con
st LayoutRect& slowPathRect) const; |
| 152 bool m_canCheckFastPathSlowPathEquality; | 152 bool m_canCheckFastPathSlowPathEquality; |
| 153 #endif | 153 #endif |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace blink | 156 } // namespace blink |
| 157 | 157 |
| 158 #endif // PaintInvalidationState_h | 158 #endif // PaintInvalidationState_h |
| OLD | NEW |