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

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

Issue 2833883003: Skip paint chunks with effectively invisible opacity. (Closed)
Patch Set: Sync to head. 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698