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

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

Issue 1823133002: Use sk_sp-based picture recording APIs in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 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
« no previous file with comments | « skia/config/SkUserConfig.h ('k') | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 08849fd8cfd8a49c80a96b07756eb313d228435a..2d0f17b8994daac736bb8b2f0fb375b97b684e9a 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -307,10 +307,9 @@ PassRefPtr<SkImage> SVGImage::imageForCurrentFrameForContainer(const KURL& url,
SkPictureRecorder recorder;
SkCanvas* canvas = recorder.beginRecording(width(), height());
drawForContainer(canvas, SkPaint(), containerSize, 1, rect(), rect(), url);
- RefPtr<SkPicture> picture = adoptRef(recorder.endRecording());
- return adoptRef(
- SkImage::NewFromPicture(picture.get(), SkISize::Make(width(), height()), nullptr, nullptr));
+ return fromSkSp(SkImage::MakeFromPicture(recorder.finishRecordingAsPicture(),
+ SkISize::Make(width(), height()), nullptr, nullptr));
}
static bool drawNeedsLayer(const SkPaint& paint)
« no previous file with comments | « skia/config/SkUserConfig.h ('k') | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698