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

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..0032a8f3e66e0f5fc19a7b5826d4dada0b36f70e 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -147,7 +147,19 @@ void PrePaintTreeWalk::InvalidatePaintLayerOptimizationsIfNeeded(
if (!object.HasLayer())
return;
+ // This method checks whether any changes to descendant-affecting clips
+ // apply to any PaintLayer that supports subsequence caching. The
+ // only PaintLayers that can have such an effect by themselves (i.e.
+ // without any ancestor changes) are PaintLayers that have clip-related
+ // properties and descendants (including self) that support subsequence
+ // caching.
PaintLayer& paint_layer = *ToLayoutBoxModelObject(object).Layer();
+ if (!paint_layer.SupportsSubsequenceCaching() &&
+ (RuntimeEnabledFeatures::slimmingPaintV2Enabled() ||
chrishtr 2017/04/13 17:19:54 I also added this for symmetry with PaintInvalidat
+ !paint_layer.HasDescendantThatSupportsSubsequenceCaching() ||
+ !paint_layer.GetLayoutObject().HasClipRelatedProperty()))
+ return;
+
if (object.StyleRef().HasTransform() ||
&object ==
context.paint_invalidator_context.paint_invalidation_container) {

Powered by Google App Engine
This is Rietveld 408576698