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

Unified Diff: third_party/WebKit/Source/platform/graphics/GeneratedImage.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/GeneratedImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
index 874dc95f56eb2e3091df6bf0d2b97bbd4c8efc23..49f8de17a0d04f724b179dfd751b56a7e3f78786 100644
--- a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
@@ -48,13 +48,13 @@ void GeneratedImage::drawPattern(GraphicsContext& destContext, const FloatRect&
SkPictureBuilder builder(tileRect, nullptr, &destContext);
builder.context().beginRecording(tileRect);
drawTile(builder.context(), srcRect);
- RefPtr<SkPicture> tilePicture = builder.endRecording();
+ sk_sp<SkPicture> tilePicture = builder.endRecording();
SkMatrix patternMatrix = SkMatrix::MakeTrans(phase.x(), phase.y());
patternMatrix.preScale(scale.width(), scale.height());
patternMatrix.preTranslate(tileRect.x(), tileRect.y());
- RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture.release());
+ RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(std::move(tilePicture));
SkPaint fillPaint = destContext.fillPaint();
picturePattern->applyToPaint(fillPaint, patternMatrix);
@@ -64,7 +64,7 @@ void GeneratedImage::drawPattern(GraphicsContext& destContext, const FloatRect&
destContext.drawRect(destRect, fillPaint);
}
-PassRefPtr<SkImage> GeneratedImage::imageForCurrentFrame()
+sk_sp<SkImage> GeneratedImage::imageForCurrentFrame()
{
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698