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

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

Issue 2498763002: Allow subsequence caching for SVG roots that have PaintLayers. (Closed)
Patch Set: none Created 4 years, 1 month 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 c96cfcae26f6dabd635ed384294b522c7061f30d..e1c8fdce368965828ee0faf852f8e417f6fe30fb 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -150,13 +150,17 @@ static bool shouldCreateSubsequence(const PaintLayer& paintLayer,
return false;
// Create subsequence for only stacking contexts whose painting are atomic.
- if (!paintLayer.stackingNode()->isStackingContext())
+ // SVG is also painted atomically.
+ if (!paintLayer.stackingNode()->isStackingContext() &&
+ !paintLayer.layoutObject()->isSVGRoot())
return false;
// The layer doesn't have children. Subsequence caching is not worth because
// normally the actual painting will be cheap.
+ // SVG is also painted atomically.
if (!PaintLayerStackingNodeIterator(*paintLayer.stackingNode(), AllChildren)
- .next())
+ .next() &&
+ !paintLayer.layoutObject()->isSVGRoot())
return false;
// When in FOUC-avoidance mode, don't cache any subsequences, to avoid having
« 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