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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.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/svg/graphics/filters/SVGFEImage.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
index 7e085f10cc99fe267f3a7b92b8f64a8676e44d15..4b65712ce98b795dc8f5b78d86c3b765e9f7b462 100644
--- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
@@ -178,15 +178,17 @@ sk_sp<SkImageFilter> FEImage::createImageFilterForLayoutObject(
transform.translate(dstRect.x(), dstRect.y());
}
- PaintRecordBuilder builder(dstRect);
- {
- TransformRecorder transformRecorder(builder.context(), layoutObject,
- transform);
- SVGPaintContext::paintResourceSubtree(builder.context(), &layoutObject);
- }
-
- return SkPictureImageFilter::Make(ToSkPicture(builder.endRecording()),
- dstRect);
+ // TODO(chrishtr): use tighter bounds for this.
+ FloatRect bounds(LayoutRect::infiniteIntRect());
+ PaintRecordBuilder builder(bounds);
+ SVGPaintContext::paintResourceSubtree(builder.context(), &layoutObject);
+
+ PaintRecorder paintRecorder;
+ PaintCanvas* canvas = paintRecorder.beginRecording(dstRect);
+ canvas->concat(affineTransformToSkMatrix(transform));
+ canvas->drawPicture(builder.endRecording());
+ return SkPictureImageFilter::Make(
+ ToSkPicture(paintRecorder.finishRecordingAsPicture()), dstRect);
}
sk_sp<SkImageFilter> FEImage::createImageFilter() {

Powered by Google App Engine
This is Rietveld 408576698