Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
index 7817508e0f0baa41bd67ae0d89099f6e0cf975f7..cbfc784b6a080149d3e4c73a8f8bbfb774aff3b7 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
@@ -135,9 +135,14 @@ PaintResult PaintLayerPainter::Paint( |
->ShouldThrottleRendering()) |
return kFullyPainted; |
- // If this layer is totally invisible then there is nothing to paint. |
- if (PaintedOutputInvisible(painting_info)) |
+ // If this layer is totally invisible then there is nothing to paint. In SPv2 |
+ // we simplify this optimization by painting even when effectively invisible |
+ // but skipping the painted content during layerization in |
+ // PaintArtifactCompositor. |
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && |
+ PaintedOutputInvisible(painting_info)) { |
return kFullyPainted; |
+ } |
if (paint_layer_.PaintsWithTransparency(painting_info.GetGlobalPaintFlags())) |
paint_flags |= kPaintLayerHaveTransparency; |