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

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

Issue 2500533003: Cache display items from SVGImage contents. (Closed)
Patch Set: none Created 4 years, 1 month 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 04e9ec2d626d32aaf3e08501b0a664362cb09f30..3b2c12117c1664908b8b3c39fa28fe73f6f9311d 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -62,7 +62,9 @@
namespace blink {
SVGImage::SVGImage(ImageObserver* observer)
- : Image(observer), m_hasPendingTimelineRewind(false) {}
+ : Image(observer),
+ m_paintController(PaintController::create()),
+ m_hasPendingTimelineRewind(false) {}
SVGImage::~SVGImage() {
if (m_page) {
@@ -369,8 +371,8 @@ void SVGImage::drawInternal(SkCanvas* canvas,
// time=0.) The reason we do this here and not in resetAnimation() is to
// avoid setting timers from the latter.
flushPendingTimelineRewind();
-
- SkPictureBuilder imagePicture(dstRect);
+ SkPictureBuilder imagePicture(dstRect, nullptr, nullptr,
+ m_paintController.get());
{
ClipRecorder clipRecorder(imagePicture.context(), imagePicture,
DisplayItem::kClipNodeImage,

Powered by Google App Engine
This is Rietveld 408576698