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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 14e447196f6d5f25649a2e48cb2ed202a6fe7259..1ff73e720d9bbbc9b581a59c9019ed66bf38a3fc 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -127,10 +127,10 @@ public:
{
context().getPaintController().endItem<EndTransformDisplayItem>(*m_pictureBuilder);
// TODO(fmalita): endRecording() should return a non-const SKP.
- sk_sp<SkPicture> recording(const_cast<SkPicture*>(m_pictureBuilder->endRecording().leakRef()));
- RefPtr<SkImage> skImage = fromSkSp(SkImage::MakeFromPicture(std::move(recording),
- SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr));
- RefPtr<Image> image = StaticBitmapImage::create(skImage.release());
+ sk_sp<SkPicture> recording(const_cast<SkPicture*>(m_pictureBuilder->endRecording().release()));
+ sk_sp<SkImage> skImage = SkImage::MakeFromPicture(std::move(recording),
+ SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr);
+ RefPtr<Image> image = StaticBitmapImage::create(std::move(skImage));
float screenDeviceScaleFactor = m_localFrame->page()->chromeClient().screenInfo().deviceScaleFactor;
return DragImage::create(image.get(), imageOrientation, screenDeviceScaleFactor, InterpolationHigh, opacity);
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698