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

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

Issue 2641173008: [SPv2] Add CSS mask support (Closed)
Patch Set: Created 3 years, 11 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
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 b2f480091b6313e4c27a4f8b5e62a73b067037f0..82ea35fea08552259baf5588f1f9bd52f1fb6d0f 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -1135,6 +1135,19 @@ void PaintLayerPainter::paintMaskForFragments(
if (layerFragments.size() > 1)
cacheSkipper.emplace(context);
+ Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ const auto* objectPaintProperties =
+ m_paintLayer.layoutObject()->paintProperties();
+ DCHECK(objectPaintProperties && objectPaintProperties->maskContent());
+ PaintChunkProperties properties(
+ context.getPaintController().currentPaintChunkProperties());
+ properties.propertyTreeState.setEffect(
+ objectPaintProperties->maskContent());
+ scopedPaintChunkProperties.emplace(context.getPaintController(),
+ m_paintLayer, properties);
+ }
+
for (auto& fragment : layerFragments)
paintFragmentWithPhase(PaintPhaseMask, fragment, context,
fragment.backgroundRect, localPaintingInfo,

Powered by Google App Engine
This is Rietveld 408576698