| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // SVG root to the userspace _before_ the relevant element. Combining this | 163 // SVG root to the userspace _before_ the relevant element. Combining this |
| 164 // with |m_paintOffset| yields the "final" offset. | 164 // with |m_paintOffset| yields the "final" offset. |
| 165 AffineTransform m_svgTransform; | 165 AffineTransform m_svgTransform; |
| 166 | 166 |
| 167 // Records objects needing paint invalidation on the next frame. See the | 167 // Records objects needing paint invalidation on the next frame. See the |
| 168 // definition of PaintInvalidationDelayedFull for more details. | 168 // definition of PaintInvalidationDelayedFull for more details. |
| 169 Vector<const LayoutObject*>& m_pendingDelayedPaintInvalidations; | 169 Vector<const LayoutObject*>& m_pendingDelayedPaintInvalidations; |
| 170 | 170 |
| 171 PaintLayer& m_paintingLayer; | 171 PaintLayer& m_paintingLayer; |
| 172 | 172 |
| 173 #if ENABLE(ASSERT) | 173 #if DCHECK_IS_ON() |
| 174 bool m_didUpdateForChildren; | 174 bool m_didUpdateForChildren = false; |
| 175 #endif | 175 #endif |
| 176 | 176 |
| 177 #if ENABLE(ASSERT) && !defined(NDEBUG) | 177 #if DCHECK_IS_ON() && !defined(NDEBUG) |
| 178 // #define CHECK_FAST_PATH_SLOW_PATH_EQUALITY | 178 // #define CHECK_FAST_PATH_SLOW_PATH_EQUALITY |
| 179 #endif | 179 #endif |
| 180 | 180 |
| 181 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY | 181 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY |
| 182 void assertFastPathAndSlowPathRectsEqual( | 182 void assertFastPathAndSlowPathRectsEqual( |
| 183 const LayoutRect& fastPathRect, | 183 const LayoutRect& fastPathRect, |
| 184 const LayoutRect& slowPathRect) const; | 184 const LayoutRect& slowPathRect) const; |
| 185 bool m_canCheckFastPathSlowPathEquality; | 185 bool m_canCheckFastPathSlowPathEquality; |
| 186 #endif | 186 #endif |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 // This is temporary to adapt legacy PaintInvalidationState to | 189 // This is temporary to adapt legacy PaintInvalidationState to |
| 190 // PaintInvalidatorContext | 190 // PaintInvalidatorContext |
| 191 class PaintInvalidatorContextAdapter : public PaintInvalidatorContext { | 191 class PaintInvalidatorContextAdapter : public PaintInvalidatorContext { |
| 192 public: | 192 public: |
| 193 PaintInvalidatorContextAdapter(const PaintInvalidationState&); | 193 PaintInvalidatorContextAdapter(const PaintInvalidationState&); |
| 194 void mapLocalRectToPaintInvalidationBacking(const LayoutObject&, | 194 void mapLocalRectToPaintInvalidationBacking(const LayoutObject&, |
| 195 LayoutRect&) const override; | 195 LayoutRect&) const override; |
| 196 | 196 |
| 197 private: | 197 private: |
| 198 const PaintInvalidationState& m_paintInvalidationState; | 198 const PaintInvalidationState& m_paintInvalidationState; |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 } // namespace blink | 201 } // namespace blink |
| 202 | 202 |
| 203 #endif // PaintInvalidationState_h | 203 #endif // PaintInvalidationState_h |
| OLD | NEW |