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

Unified Diff: third_party/WebKit/Source/core/paint/FragmentData.h

Issue 2854493002: Store previous painting clip rects on FragmentData. (Closed)
Patch Set: none Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/FragmentData.h
diff --git a/third_party/WebKit/Source/core/paint/FragmentData.h b/third_party/WebKit/Source/core/paint/FragmentData.h
index 8951c3211dc9368fe926015ec3c54cdd90e26938..5fea7edceac60ac4d9460d0af030b1d19f48e6b2 100644
--- a/third_party/WebKit/Source/core/paint/FragmentData.h
+++ b/third_party/WebKit/Source/core/paint/FragmentData.h
@@ -5,7 +5,9 @@
#ifndef FragmentData_h
#define FragmentData_h
+#include "core/paint/ClipRects.h"
#include "core/paint/ObjectPaintProperties.h"
+#include "platform/RuntimeEnabledFeatures.h"
namespace blink {
@@ -27,12 +29,25 @@ class CORE_EXPORT FragmentData {
ObjectPaintProperties& EnsurePaintProperties();
void ClearPaintProperties();
+ ClipRects* PreviousClipRects() const {
+ DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
+ return previous_clip_rects_.Get();
+ }
+ void SetPreviousClipRects(ClipRects& clip_rects) {
+ previous_clip_rects_ = &clip_rects;
+ }
+ void ClearPreviousClipRects() { previous_clip_rects_.Clear(); }
+
FragmentData* NextFragment() { return next_fragment_.get(); }
private:
// Holds references to the paint property nodes created by this object.
std::unique_ptr<ObjectPaintProperties> paint_properties_;
+ // These are used to detect changes to clipping that might invalidate
+ // subsequence caching or paint phase optimizations.
+ RefPtr<ClipRects> previous_clip_rects_;
+
std::unique_ptr<FragmentData> next_fragment_;
};
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698