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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.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/platform/graphics/paint/PaintRecordBuilder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp
index 0e71266e2f7be0777916939fcc4c0fb8ef29b146..c38eb19d187ddd65820a134a21ac2b9bcd9b16d2 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp
@@ -25,17 +25,13 @@ PaintRecordBuilder::PaintRecordBuilder(const FloatRect& bounds,
} else {
m_paintControllerPtr = PaintController::create();
m_paintController = m_paintControllerPtr.get();
+ }
- // Content painted with a new paint controller in SPv2 will have an
- // independent property tree set.
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- PaintChunk::Id id(*this, DisplayItem::kSVGImage);
- PropertyTreeState state(TransformPaintPropertyNode::root(),
- ClipPaintPropertyNode::root(),
- EffectPaintPropertyNode::root());
- m_paintController->updateCurrentPaintChunkProperties(&id, state);
- }
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ m_paintController->updateCurrentPaintChunkProperties(
+ nullptr, PropertyTreeState::root());
}
+
#if DCHECK_IS_ON()
m_paintController->setUsage(PaintController::ForPaintRecordBuilder);
#endif
@@ -58,7 +54,7 @@ PaintRecordBuilder::~PaintRecordBuilder() {
sk_sp<PaintRecord> PaintRecordBuilder::endRecording() {
m_context->beginRecording(m_bounds);
m_paintController->commitNewDisplayItems();
- m_paintController->paintArtifact().replay(*m_context);
+ m_paintController->paintArtifact().replay(m_bounds, *m_context);
return m_context->endRecording();
}

Powered by Google App Engine
This is Rietveld 408576698