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