Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h

Issue 2476813002: Move LayoutObject::m_previousPosition... into a global map in ObjectPaintInvalidator (Closed)
Patch Set: doc Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "wtf/AutoReset.h" 11 #include "wtf/AutoReset.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class DisplayItemClient; 15 class DisplayItemClient;
16 class LayoutBoxModelObject; 16 class LayoutBoxModelObject;
17 class LayoutObject; 17 class LayoutObject;
18 class LayoutPoint;
18 class LayoutRect; 19 class LayoutRect;
19 struct PaintInvalidatorContext; 20 struct PaintInvalidatorContext;
20 21
21 class CORE_EXPORT ObjectPaintInvalidator { 22 class CORE_EXPORT ObjectPaintInvalidator {
22 STACK_ALLOCATED(); 23 STACK_ALLOCATED();
23 24
24 public: 25 public:
25 ObjectPaintInvalidator(const LayoutObject& object) : m_object(object) {} 26 ObjectPaintInvalidator(const LayoutObject& object) : m_object(object) {}
26 27
27 static void objectWillBeDestroyed(const LayoutObject&); 28 static void objectWillBeDestroyed(const LayoutObject&);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // rect is in the object's coordinate space. If a DisplayItemClient is 67 // rect is in the object's coordinate space. If a DisplayItemClient is
67 // specified, that client is invalidated rather than |m_object|. 68 // specified, that client is invalidated rather than |m_object|.
68 // Returns the visual rect that was invalidated (i.e, invalidation in the 69 // Returns the visual rect that was invalidated (i.e, invalidation in the
69 // space of the GraphicsLayer backing this LayoutObject). 70 // space of the GraphicsLayer backing this LayoutObject).
70 LayoutRect invalidatePaintRectangle(const LayoutRect&, DisplayItemClient*); 71 LayoutRect invalidatePaintRectangle(const LayoutRect&, DisplayItemClient*);
71 72
72 void invalidatePaintIncludingNonCompositingDescendants(); 73 void invalidatePaintIncludingNonCompositingDescendants();
73 void invalidatePaintIncludingNonSelfPaintingLayerDescendants( 74 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(
74 const LayoutBoxModelObject& paintInvalidationContainer); 75 const LayoutBoxModelObject& paintInvalidationContainer);
75 76
77 LayoutPoint previousLocationInBacking() const;
78 void setPreviousLocationInBacking(const LayoutPoint&);
79
76 private: 80 private:
77 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal( 81 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(
78 const LayoutBoxModelObject& paintInvalidationContainer); 82 const LayoutBoxModelObject& paintInvalidationContainer);
79 void setBackingNeedsPaintInvalidationInRect( 83 void setBackingNeedsPaintInvalidationInRect(
80 const LayoutBoxModelObject& paintInvalidationContainer, 84 const LayoutBoxModelObject& paintInvalidationContainer,
81 const LayoutRect&, 85 const LayoutRect&,
82 PaintInvalidationReason); 86 PaintInvalidationReason);
83 87
84 protected: 88 protected:
85 const LayoutObject& m_object; 89 const LayoutObject& m_object;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 public: 137 public:
134 DisablePaintInvalidationStateAsserts(); 138 DisablePaintInvalidationStateAsserts();
135 139
136 private: 140 private:
137 AutoReset<bool> m_disabler; 141 AutoReset<bool> m_disabler;
138 }; 142 };
139 143
140 } // namespace blink 144 } // namespace blink
141 145
142 #endif 146 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698