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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBufferSurface.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/platform/graphics/ImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp
index 9826aff936a790f3a9071564af9f11bbeca9bbb7..9c21fb4a4f23a1424021930aba9d8d3d890cc278 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp
@@ -50,7 +50,7 @@ ImageBufferSurface::ImageBufferSurface(const IntSize& size, OpacityMode opacityM
ImageBufferSurface::~ImageBufferSurface() { }
-PassRefPtr<SkPicture> ImageBufferSurface::getPicture()
+sk_sp<SkPicture> ImageBufferSurface::getPicture()
{
return nullptr;
}
@@ -72,11 +72,11 @@ void ImageBufferSurface::clear()
void ImageBufferSurface::draw(GraphicsContext& context, const FloatRect& destRect, const FloatRect& srcRect, SkXfermode::Mode op)
{
- RefPtr<SkImage> snapshot = newImageSnapshot(PreferNoAcceleration, SnapshotReasonPaint);
+ sk_sp<SkImage> snapshot = newImageSnapshot(PreferNoAcceleration, SnapshotReasonPaint);
if (!snapshot)
return;
- RefPtr<Image> image = StaticBitmapImage::create(snapshot.release());
+ RefPtr<Image> image = StaticBitmapImage::create(std::move(snapshot));
context.drawImage(image.get(), destRect, &srcRect, op);
}

Powered by Google App Engine
This is Rietveld 408576698