Chromium Code Reviews| 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) { |