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

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

Issue 2751433002: [SPv2] Flatten property trees in PaintRecordBuilder into a single display list. (Closed)
Patch Set: none Created 3 years, 9 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/SVGFilterPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp b/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
index a2a2400bdc8e3004e691e587ef7c53ebba024d5d..9a84a5dda828474b3e47cbcff6eac9cbda4682f4 100644
--- a/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp
@@ -24,6 +24,15 @@ GraphicsContext* SVGFilterRecordingContext::beginContent(
m_paintController = PaintController::create();
m_context = WTF::wrapUnique(new GraphicsContext(*m_paintController));
+ // Content painted into a new PaintRecord in SPv2 will have an
+ // independent property tree set.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ PropertyTreeState state(TransformPaintPropertyNode::root(),
+ ClipPaintPropertyNode::root(),
+ EffectPaintPropertyNode::root());
+ m_paintController->updateCurrentPaintChunkProperties(nullptr, state);
pdr. 2017/03/28 21:01:30 Can you use PropertyTreeState::root here?
chrishtr 2017/03/28 21:43:23 Done. Also surveyed the code and converted a few m
+ }
+
filterData->m_state = FilterData::RecordingContent;
return m_context.get();
}
@@ -40,7 +49,12 @@ void SVGFilterRecordingContext::endContent(FilterData* filterData) {
DCHECK(m_context);
m_context->beginRecording(filter->filterRegion());
m_paintController->commitNewDisplayItems();
- m_paintController->paintArtifact().replay(*m_context);
+
+ m_paintController->paintArtifact().replay(
+ filter->filterRegion(), *m_context,
+ m_initialContext.getPaintController()
+ .currentPaintChunkProperties()
+ .propertyTreeState);
SkiaImageFilterBuilder::buildSourceGraphic(sourceGraphic,
m_context->endRecording());

Powered by Google App Engine
This is Rietveld 408576698