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

Unified Diff: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp

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/PrePaintTreeWalk.cpp
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
index 53ebcc64224eea42f9f30b9f3b5b941acca85d57..1deabb8faa131f91b92fc333c043506efd859fdc 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -154,6 +154,14 @@ void PrePaintTreeWalk::InvalidatePaintLayerOptimizationsIfNeeded(
context.ancestor_transformed_or_root_paint_layer = &paint_layer;
}
+ // This code below checks whether any clips have changed that might:
+ // (a) invalidate optimizations made for a PaintLayer that supports
+ // subsequence caching, or
+ // (b) impact clipping of descendant visual rects.
+ if (!paint_layer.SupportsSubsequenceCaching() &&
+ !paint_layer.GetLayoutObject().HasClipRelatedProperty())
+ return;
+
const auto& ancestor =
context.ancestor_transformed_or_root_paint_layer->GetLayoutObject();
PropertyTreeState ancestor_state = *ancestor.LocalBorderBoxProperties();
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerTest.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalkTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698