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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 // Records |obj| as needing paint invalidation on the next frame. See the de
finition of PaintInvalidationDelayedFull for more details. | 62 // Records |obj| as needing paint invalidation on the next frame. See the de
finition of PaintInvalidationDelayedFull for more details. |
63 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) { m_pendingDelaye
dPaintInvalidations.append(&obj); } | 63 void pushDelayedPaintInvalidationTarget(LayoutObject& obj) { m_pendingDelaye
dPaintInvalidations.append(&obj); } |
64 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() { return m_p
endingDelayedPaintInvalidations; } | 64 Vector<LayoutObject*>& pendingDelayedPaintInvalidationTargets() { return m_p
endingDelayedPaintInvalidations; } |
65 | 65 |
66 // Disable view clipping and scroll offset adjustment for paint invalidation
of FrameView scrollbars. | 66 // Disable view clipping and scroll offset adjustment for paint invalidation
of FrameView scrollbars. |
67 // TODO(wangxianzhu): Remove this when root-layer-scrolls launches. | 67 // TODO(wangxianzhu): Remove this when root-layer-scrolls launches. |
68 bool viewClippingAndScrollOffsetDisabled() const { return m_viewClippingAndS
crollOffsetDisabled; } | 68 bool viewClippingAndScrollOffsetDisabled() const { return m_viewClippingAndS
crollOffsetDisabled; } |
69 void setViewClippingAndScrollOffsetDisabled(bool b) { m_viewClippingAndScrol
lOffsetDisabled = b; } | 69 void setViewClippingAndScrollOffsetDisabled(bool b) { m_viewClippingAndScrol
lOffsetDisabled = b; } |
70 | 70 |
71 PaintLayer& enclosingLayer(const LayoutObject&) const; | 71 PaintLayer& enclosingSelfPaintingLayer(const LayoutObject&) const; |
72 | 72 |
73 private: | 73 private: |
74 PaintInvalidationState(const LayoutView&, Vector<LayoutObject*>& pendingDela
yedPaintInvalidations, PaintInvalidationState* ownerPaintInvalidationState); | 74 PaintInvalidationState(const LayoutView&, Vector<LayoutObject*>& pendingDela
yedPaintInvalidations, PaintInvalidationState* ownerPaintInvalidationState); |
75 | 75 |
76 void applyClipIfNeeded(const LayoutObject&); | 76 void applyClipIfNeeded(const LayoutObject&); |
77 void addClipRectRelativeToPaintOffset(const LayoutSize& clipSize); | 77 void addClipRectRelativeToPaintOffset(const LayoutSize& clipSize); |
78 | 78 |
79 friend class ForceHorriblySlowRectMapping; | 79 friend class ForceHorriblySlowRectMapping; |
80 | 80 |
81 bool m_clipped; | 81 bool m_clipped; |
(...skipping 12 matching lines...) Expand all Loading... |
94 // It is the enclosing composited object. | 94 // It is the enclosing composited object. |
95 const LayoutBoxModelObject& m_paintInvalidationContainer; | 95 const LayoutBoxModelObject& m_paintInvalidationContainer; |
96 | 96 |
97 // Transform from the initial viewport coordinate system of an outermost | 97 // Transform from the initial viewport coordinate system of an outermost |
98 // SVG root to the userspace _before_ the relevant element. Combining this | 98 // SVG root to the userspace _before_ the relevant element. Combining this |
99 // with |m_paintOffset| yields the "final" offset. | 99 // with |m_paintOffset| yields the "final" offset. |
100 AffineTransform m_svgTransform; | 100 AffineTransform m_svgTransform; |
101 | 101 |
102 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations; | 102 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations; |
103 | 103 |
104 PaintLayer& m_enclosingLayer; | 104 PaintLayer& m_enclosingSelfPaintingLayer; |
105 }; | 105 }; |
106 | 106 |
107 } // namespace blink | 107 } // namespace blink |
108 | 108 |
109 #endif // PaintInvalidationState_h | 109 #endif // PaintInvalidationState_h |
OLD | NEW |