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

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

Issue 2810503002: Only store previous clip rects for PaintLayers that support subsequences. (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/PaintLayer.h
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h
index 3c9991421b30bf38c06f3e770bc203bebae249b6..c0944a535a1a2f877ef5acf4e7602e4dcb71c926 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.h
@@ -580,6 +580,8 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
bool PaintsWithTransform(GlobalPaintFlags) const;
+ bool SupportsSubsequenceCaching() const;
+
// Returns true if background phase is painted opaque in the given rect.
// The query rect is given in local coordinates.
bool BackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
@@ -792,6 +794,10 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
DCHECK(!needs_descendant_dependent_flags_update_);
return has_descendant_with_clip_path_;
}
+ bool HasDescendantThatSupportsSubsequenceCaching() const {
+ DCHECK(!needs_descendant_dependent_flags_update_);
+ return has_descendant_that_supports_subsequence_caching_;
+ }
// Returns true if there is a descendant with blend-mode that is
// not contained within another enclosing stacking context other
@@ -924,6 +930,9 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
void SetPreviousPaintingClipRects(ClipRects& clip_rects) {
previous_painting_clip_rects_ = &clip_rects;
}
+ void ClearPreviousPaintingClipRects() {
+ previous_painting_clip_rects_.Clear();
+ }
LayoutRect PreviousPaintDirtyRect() const {
return previous_paint_dirty_rect_;
@@ -1217,6 +1226,7 @@ class CORE_EXPORT PaintLayer : public DisplayItemClient {
unsigned has_descendant_with_clip_path_ : 1;
unsigned has_non_isolated_descendant_with_blend_mode_ : 1;
unsigned has_ancestor_with_clip_path_ : 1;
+ unsigned has_descendant_that_supports_subsequence_caching_ : 1;
unsigned self_painting_status_changed_ : 1;

Powered by Google App Engine
This is Rietveld 408576698