Chromium Code Reviews| 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()); |