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

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

Issue 2707063003: Don't invalidate rect if it's covered by fully invalidated parent's visual rect (Closed)
Patch Set: - Created 3 years, 9 months 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"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 PaintInvalidationReason); 105 PaintInvalidationReason);
106 106
107 // This function generates a full invalidation, which means invalidating both 107 // This function generates a full invalidation, which means invalidating both
108 // |oldVisualRect| and |newVisualRect|. This is the default choice when 108 // |oldVisualRect| and |newVisualRect|. This is the default choice when
109 // generating an invalidation, as it is always correct, albeit it may force 109 // generating an invalidation, as it is always correct, albeit it may force
110 // some extra painting. 110 // some extra painting.
111 void fullyInvalidatePaint(PaintInvalidationReason, 111 void fullyInvalidatePaint(PaintInvalidationReason,
112 const LayoutRect& oldVisualRect, 112 const LayoutRect& oldVisualRect,
113 const LayoutRect& newVisualRect); 113 const LayoutRect& newVisualRect);
114 114
115 void invalidatePaintRectangleWithContext(const LayoutRect&,
116 PaintInvalidationReason);
117
115 private: 118 private:
116 void invalidateSelectionIfNeeded(PaintInvalidationReason); 119 void invalidateSelectionIfNeeded(PaintInvalidationReason);
120 bool parentFullyInvalidatedOnSameBacking();
117 121
118 const PaintInvalidatorContext& m_context; 122 const PaintInvalidatorContext& m_context;
119 }; 123 };
120 124
121 // TODO(crbug.com/457415): We should not allow paint invalidation out of paint 125 // TODO(crbug.com/457415): We should not allow paint invalidation out of paint
122 // invalidation state. 126 // invalidation state.
123 class DisablePaintInvalidationStateAsserts { 127 class DisablePaintInvalidationStateAsserts {
124 STACK_ALLOCATED(); 128 STACK_ALLOCATED();
125 WTF_MAKE_NONCOPYABLE(DisablePaintInvalidationStateAsserts); 129 WTF_MAKE_NONCOPYABLE(DisablePaintInvalidationStateAsserts);
126 130
127 public: 131 public:
128 DisablePaintInvalidationStateAsserts(); 132 DisablePaintInvalidationStateAsserts();
129 133
130 private: 134 private:
131 AutoReset<bool> m_disabler; 135 AutoReset<bool> m_disabler;
132 }; 136 };
133 137
134 } // namespace blink 138 } // namespace blink
135 139
136 #endif 140 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698