OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ObjectPaintInvalidator_h | 5 #ifndef ObjectPaintInvalidator_h |
6 #define ObjectPaintInvalidator_h | 6 #define ObjectPaintInvalidator_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/graphics/PaintInvalidationReason.h" | 9 #include "platform/graphics/PaintInvalidationReason.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. | 44 // The caller should ensure the painting layer has been setNeedsRepaint befo
re calling this function. |
45 void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidation
Reason); | 45 void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidation
Reason); |
46 | 46 |
47 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space | 47 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space |
48 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same | 48 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same |
49 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. | 49 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. |
50 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida
tionContainer, const LayoutRect&, PaintInvalidationReason); | 50 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida
tionContainer, const LayoutRect&, PaintInvalidationReason); |
51 | 51 |
52 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect is in the object's coordinate space. | 52 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect is in the object's coordinate space. |
53 void invalidatePaintRectangle(const LayoutRect&); | 53 // If a DisplayItemClient is specified, that client is invalidated rather th
an |m_object|. |
| 54 void invalidatePaintRectangle(const LayoutRect&, DisplayItemClient*); |
54 | 55 |
55 void invalidatePaintIncludingNonCompositingDescendants(); | 56 void invalidatePaintIncludingNonCompositingDescendants(); |
56 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox
ModelObject& paintInvalidationContainer); | 57 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox
ModelObject& paintInvalidationContainer); |
57 | 58 |
58 private: | 59 private: |
59 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); | 60 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L
ayoutBoxModelObject& paintInvalidationContainer); |
60 void setBackingNeedsPaintInvalidationInRect(const LayoutBoxModelObject& pain
tInvalidationContainer, const LayoutRect&, PaintInvalidationReason); | 61 void setBackingNeedsPaintInvalidationInRect(const LayoutBoxModelObject& pain
tInvalidationContainer, const LayoutRect&, PaintInvalidationReason); |
61 | 62 |
62 protected: | 63 protected: |
63 const LayoutObject& m_object; | 64 const LayoutObject& m_object; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 WTF_MAKE_NONCOPYABLE(DisablePaintInvalidationStateAsserts); | 98 WTF_MAKE_NONCOPYABLE(DisablePaintInvalidationStateAsserts); |
98 public: | 99 public: |
99 DisablePaintInvalidationStateAsserts(); | 100 DisablePaintInvalidationStateAsserts(); |
100 private: | 101 private: |
101 AutoReset<bool> m_disabler; | 102 AutoReset<bool> m_disabler; |
102 }; | 103 }; |
103 | 104 |
104 } // namespace blink | 105 } // namespace blink |
105 | 106 |
106 #endif | 107 #endif |
OLD | NEW |