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

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

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Self-review. Created 4 years, 4 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 21aa4571a02913c234e721802b7bf49d100121b4..a30902662e2d404511eeed83ea52179cbe630665 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);

Powered by Google App Engine
This is Rietveld 408576698