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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 2632823002: SPv2: Paint SVG images and self-contained recorded pictures with their own trees. (Closed)
Patch Set: none 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/svg/graphics/SVGImage.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
index eebb78c4e9761826b5a3863114c7d3eded633e60..891ab6ff3816ceb42634602ea6476666814d0d70 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -288,6 +288,16 @@ void SVGImage::drawPatternForContainer(GraphicsContext& context,
spacedTile.expand(FloatSize(repeatSpacing));
SkPictureBuilder patternPicture(spacedTile, nullptr, &context);
+ // SVG images paint into their own property tree set that is distinct
+ // from the embedding frame tree.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ PaintChunk::Id id(patternPicture, DisplayItem::kSVGImage);
+ PropertyTreeState state(
+ TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
+ EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root());
+ m_paintController->updateCurrentPaintChunkProperties(&id, state);
+ }
+
{
DrawingRecorder patternPictureRecorder(
patternPicture.context(), patternPicture, DisplayItem::Type::kSVGImage,
@@ -379,6 +389,16 @@ void SVGImage::drawInternal(SkCanvas* canvas,
flushPendingTimelineRewind();
SkPictureBuilder imagePicture(dstRect, nullptr, nullptr,
m_paintController.get());
+ // SVG images paint into their own property tree set that is distinct
pdr. 2017/01/17 21:48:00 Could you move this into SkPictureBuilder?
+ // from the embedding frame tree.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ PaintChunk::Id id(imagePicture, DisplayItem::kSVGImage);
+ PropertyTreeState state(
+ TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
+ EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root());
+ m_paintController->updateCurrentPaintChunkProperties(&id, state);
+ }
+
{
ClipRecorder clipRecorder(imagePicture.context(), imagePicture,
DisplayItem::kClipNodeImage,

Powered by Google App Engine
This is Rietveld 408576698