| 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 "platform/geometry/LayoutRect.h" | 8 #include "platform/geometry/LayoutRect.h" |
| 9 #include "platform/transforms/AffineTransform.h" | 9 #include "platform/transforms/AffineTransform.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) const { m_pending
DelayedPaintInvalidations.append(&obj); } | 74 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) const { m_pending
DelayedPaintInvalidations.append(&obj); } |
| 75 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() const { retu
rn m_pendingDelayedPaintInvalidations; } | 75 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() const { retu
rn m_pendingDelayedPaintInvalidations; } |
| 76 | 76 |
| 77 PaintLayer& enclosingSelfPaintingLayer(const LayoutObject&) const; | 77 PaintLayer& enclosingSelfPaintingLayer(const LayoutObject&) const; |
| 78 | 78 |
| 79 #if ENABLE(ASSERT) | 79 #if ENABLE(ASSERT) |
| 80 const LayoutObject& currentObject() const { return m_currentObject; } | 80 const LayoutObject& currentObject() const { return m_currentObject; } |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 friend class VisualRectMappingTest; |
| 85 |
| 84 void updateForNormalChildren(); | 86 void updateForNormalChildren(); |
| 85 | 87 |
| 86 LayoutRect computePaintInvalidationRectInBackingForSVG() const; | 88 LayoutRect computePaintInvalidationRectInBackingForSVG() const; |
| 87 | 89 |
| 88 void addClipRectRelativeToPaintOffset(const LayoutRect& localClipRect); | 90 void addClipRectRelativeToPaintOffset(const LayoutRect& localClipRect); |
| 89 | 91 |
| 90 friend class ForceHorriblySlowRectMapping; | |
| 91 | |
| 92 const LayoutObject& m_currentObject; | 92 const LayoutObject& m_currentObject; |
| 93 | 93 |
| 94 bool m_forcedSubtreeInvalidationWithinContainer; | 94 bool m_forcedSubtreeInvalidationWithinContainer; |
| 95 bool m_forcedSubtreeInvalidationRectUpdateWithinContainer; | 95 bool m_forcedSubtreeInvalidationRectUpdateWithinContainer; |
| 96 | 96 |
| 97 bool m_clipped; | 97 bool m_clipped; |
| 98 bool m_clippedForAbsolutePosition; | 98 bool m_clippedForAbsolutePosition; |
| 99 | 99 |
| 100 // Clip rect from paintInvalidationContainer if m_cachedOffsetsEnabled is tr
ue. | 100 // Clip rect from paintInvalidationContainer if m_cachedOffsetsEnabled is tr
ue. |
| 101 LayoutRect m_clipRect; | 101 LayoutRect m_clipRect; |
| 102 LayoutRect m_clipRectForAbsolutePosition; | 102 LayoutRect m_clipRectForAbsolutePosition; |
| 103 | 103 |
| 104 // x/y offset from the paintInvalidationContainer if m_cachedOffsetsEnabled
is true. | 104 // x/y offset from the paintInvalidationContainer if m_cachedOffsetsEnabled
is true. |
| 105 // It includes relative positioning and scroll offsets. | 105 // It includes relative positioning and scroll offsets. |
| 106 LayoutSize m_paintOffset; | 106 LayoutSize m_paintOffset; |
| 107 LayoutSize m_paintOffsetForAbsolutePosition; | 107 LayoutSize m_paintOffsetForAbsolutePosition; |
| 108 | 108 |
| 109 // Whether m_paintOffset[XXX] and m_clipRect[XXX] are valid and can be used | 109 // Whether m_paintOffset[XXX] and m_clipRect[XXX] are valid and can be used |
| 110 // to map a rect from space of the current object to space of paintInvalidat
ionContainer. | 110 // to map a rect from space of the current object to space of paintInvalidat
ionContainer. |
| 111 mutable bool m_cachedOffsetsEnabled; | 111 bool m_cachedOffsetsEnabled; |
| 112 bool m_cachedOffsetsForAbsolutePositionEnabled; | 112 bool m_cachedOffsetsForAbsolutePositionEnabled; |
| 113 | 113 |
| 114 // The following two fields are never null. Declare them as pointers because
we need some | 114 // The following two fields are never null. Declare them as pointers because
we need some |
| 115 // logic to initialize them in the body of the constructor. | 115 // logic to initialize them in the body of the constructor. |
| 116 | 116 |
| 117 // The current paint invalidation container for normal flow objects. | 117 // The current paint invalidation container for normal flow objects. |
| 118 // It is the enclosing composited object. | 118 // It is the enclosing composited object. |
| 119 const LayoutBoxModelObject* m_paintInvalidationContainer; | 119 const LayoutBoxModelObject* m_paintInvalidationContainer; |
| 120 | 120 |
| 121 // The current paint invalidation container for stacked contents (stacking c
ontexts or positioned objects). | 121 // The current paint invalidation container for stacked contents (stacking c
ontexts or positioned objects). |
| (...skipping 14 matching lines...) Expand all Loading... |
| 136 PaintLayer& m_enclosingSelfPaintingLayer; | 136 PaintLayer& m_enclosingSelfPaintingLayer; |
| 137 | 137 |
| 138 #if ENABLE(ASSERT) | 138 #if ENABLE(ASSERT) |
| 139 bool m_didUpdateForChildren; | 139 bool m_didUpdateForChildren; |
| 140 #endif | 140 #endif |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace blink | 143 } // namespace blink |
| 144 | 144 |
| 145 #endif // PaintInvalidationState_h | 145 #endif // PaintInvalidationState_h |
| OLD | NEW |