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

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

Issue 2570223002: [SPv2] Associate effect property nodes for SVG paint chunks (Closed)
Patch Set: rebased Created 4 years 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/SVGPaintContext.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
index eab8db4016e64c7acf95bde7fe8ce018da59d96b..bf6b345789623c253b27e6bb2a7f41cfa2f5d9de 100644
--- a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
@@ -62,6 +62,26 @@ bool SVGPaintContext::applyClipMaskAndFilterIfNecessary() {
m_applyClipMaskAndFilterIfNecessaryCalled = true;
#endif
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ // SVGRoot works like normal CSS replaced element and its effects are
+ // applied as stacking context effect by PaintLayerPainter.
+ if (m_object.isSVGRoot())
+ return true;
+
+ const auto* paintProperties = m_object.paintProperties();
+ const EffectPaintPropertyNode* effect =
+ paintProperties ? paintProperties->effect() : nullptr;
+ if (!effect)
+ return true;
+
+ auto& paintController = paintInfo().context.getPaintController();
+ PaintChunkProperties properties(
+ paintController.currentPaintChunkProperties());
+ properties.propertyTreeState.setEffect(effect);
+ m_scopedPaintChunkProperties.emplace(paintController, m_object, properties);
+ return true;
+ }
+
// When rendering clip paths as masks, only geometric operations should be
// included so skip non-geometric operations such as compositing, masking, and
// filtering.

Powered by Google App Engine
This is Rietveld 408576698