| 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 "core/paint/PaintInvalidator.h" | 9 #include "core/paint/PaintInvalidator.h" |
| 10 #include "platform/geometry/LayoutRect.h" | 10 #include "platform/geometry/LayoutRect.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 const LayoutBoxModelObject& paintInvalidationContainer() const { | 88 const LayoutBoxModelObject& paintInvalidationContainer() const { |
| 89 return *m_paintInvalidationContainer; | 89 return *m_paintInvalidationContainer; |
| 90 } | 90 } |
| 91 | 91 |
| 92 // Computes the position of the current object ((0,0) in the space of the | 92 // Computes the position of the current object ((0,0) in the space of the |
| 93 // object) in the space of paint invalidation backing. | 93 // object) in the space of paint invalidation backing. |
| 94 LayoutPoint computePositionFromPaintInvalidationBacking() const; | 94 LayoutPoint computePositionFromPaintInvalidationBacking() const; |
| 95 | 95 |
| 96 // Returns the rect bounds needed to invalidate paint of this object, | 96 // Returns the rect bounds needed to invalidate paint of this object, |
| 97 // in the space of paint invalidation backing. | 97 // in the space of paint invalidation backing. |
| 98 LayoutRect computePaintInvalidationRectInBacking() const; | 98 LayoutRect computeVisualRectInBacking() const; |
| 99 | 99 |
| 100 void mapLocalRectToPaintInvalidationBacking(LayoutRect&) const; | 100 void mapLocalRectToPaintInvalidationBacking(LayoutRect&) const; |
| 101 | 101 |
| 102 PaintLayer& paintingLayer() const; | 102 PaintLayer& paintingLayer() const; |
| 103 | 103 |
| 104 const LayoutObject& currentObject() const { return m_currentObject; } | 104 const LayoutObject& currentObject() const { return m_currentObject; } |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 friend class VisualRectMappingTest; | 107 friend class VisualRectMappingTest; |
| 108 friend class PaintInvalidatorContextAdapter; | 108 friend class PaintInvalidatorContextAdapter; |
| 109 | 109 |
| 110 void mapLocalRectToPaintInvalidationContainer(LayoutRect&) const; | 110 void mapLocalRectToPaintInvalidationContainer(LayoutRect&) const; |
| 111 | 111 |
| 112 void updateForCurrentObject(const PaintInvalidationState& parentState); | 112 void updateForCurrentObject(const PaintInvalidationState& parentState); |
| 113 void updateForNormalChildren(); | 113 void updateForNormalChildren(); |
| 114 | 114 |
| 115 LayoutRect computePaintInvalidationRectInBackingForSVG() const; | 115 LayoutRect computeVisualRectInBackingForSVG() const; |
| 116 | 116 |
| 117 void addClipRectRelativeToPaintOffset(const LayoutRect& localClipRect); | 117 void addClipRectRelativeToPaintOffset(const LayoutRect& localClipRect); |
| 118 | 118 |
| 119 const LayoutObject& m_currentObject; | 119 const LayoutObject& m_currentObject; |
| 120 | 120 |
| 121 unsigned m_forcedSubtreeInvalidationFlags; | 121 unsigned m_forcedSubtreeInvalidationFlags; |
| 122 | 122 |
| 123 bool m_clipped; | 123 bool m_clipped; |
| 124 bool m_clippedForAbsolutePosition; | 124 bool m_clippedForAbsolutePosition; |
| 125 | 125 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 void mapLocalRectToPaintInvalidationBacking(const LayoutObject&, | 191 void mapLocalRectToPaintInvalidationBacking(const LayoutObject&, |
| 192 LayoutRect&) const override; | 192 LayoutRect&) const override; |
| 193 | 193 |
| 194 private: | 194 private: |
| 195 const PaintInvalidationState& m_paintInvalidationState; | 195 const PaintInvalidationState& m_paintInvalidationState; |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace blink | 198 } // namespace blink |
| 199 | 199 |
| 200 #endif // PaintInvalidationState_h | 200 #endif // PaintInvalidationState_h |
| OLD | NEW |