| 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 "wtf/Noncopyable.h" | 9 #include "wtf/Noncopyable.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 const LayoutRect& clipRect() const { return m_clipRect; } | 27 const LayoutRect& clipRect() const { return m_clipRect; } |
| 28 const LayoutSize& paintOffset() const { return m_paintOffset; } | 28 const LayoutSize& paintOffset() const { return m_paintOffset; } |
| 29 | 29 |
| 30 bool cachedOffsetsEnabled() const { return m_cachedOffsetsEnabled; } | 30 bool cachedOffsetsEnabled() const { return m_cachedOffsetsEnabled; } |
| 31 bool isClipped() const { return m_clipped; } | 31 bool isClipped() const { return m_clipped; } |
| 32 | 32 |
| 33 bool forceCheckForPaintInvalidation() const { return m_forceCheckForPaintInv
alidation; } | 33 bool forceCheckForPaintInvalidation() const { return m_forceCheckForPaintInv
alidation; } |
| 34 void setForceCheckForPaintInvalidation() { m_forceCheckForPaintInvalidation
= true; } | 34 void setForceCheckForPaintInvalidation() { m_forceCheckForPaintInvalidation
= true; } |
| 35 | 35 |
| 36 const RenderLayerModelObject& paintInvalidationContainer() const { return m_
paintInvalidationContainer; } | 36 const RenderLayerModelObject& paintInvalidationContainer() const { return m_
paintInvalidationContainer; } |
| 37 const RenderObject& renderer() const { return m_renderer; } | |
| 38 | 37 |
| 39 bool canMapToContainer(const RenderLayerModelObject* container) const | 38 bool canMapToContainer(const RenderLayerModelObject* container) const |
| 40 { | 39 { |
| 41 return m_cachedOffsetsEnabled && container == &m_paintInvalidationContai
ner; | 40 return m_cachedOffsetsEnabled && container == &m_paintInvalidationContai
ner; |
| 42 } | 41 } |
| 43 private: | 42 private: |
| 44 void applyClipIfNeeded(const RenderObject&); | 43 void applyClipIfNeeded(const RenderObject&); |
| 45 | 44 |
| 46 friend class ForceHorriblySlowRectMapping; | 45 friend class ForceHorriblySlowRectMapping; |
| 47 | 46 |
| 48 bool m_clipped; | 47 bool m_clipped; |
| 49 mutable bool m_cachedOffsetsEnabled; | 48 mutable bool m_cachedOffsetsEnabled; |
| 50 bool m_forceCheckForPaintInvalidation; | 49 bool m_forceCheckForPaintInvalidation; |
| 51 | 50 |
| 52 LayoutRect m_clipRect; | 51 LayoutRect m_clipRect; |
| 53 | 52 |
| 54 // x/y offset from paint invalidation container. Includes relative positioni
ng and scroll offsets. | 53 // x/y offset from paint invalidation container. Includes relative positioni
ng and scroll offsets. |
| 55 LayoutSize m_paintOffset; | 54 LayoutSize m_paintOffset; |
| 56 | 55 |
| 57 const RenderLayerModelObject& m_paintInvalidationContainer; | 56 const RenderLayerModelObject& m_paintInvalidationContainer; |
| 58 | |
| 59 const RenderObject& m_renderer; | |
| 60 }; | 57 }; |
| 61 | 58 |
| 62 } // namespace blink | 59 } // namespace blink |
| 63 | 60 |
| 64 #endif // PaintInvalidationState_h | 61 #endif // PaintInvalidationState_h |
| OLD | NEW |