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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.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/Image.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
index 0a7109d0cd96d25cc76889554d5567d9b4c1bcbd..9408ace1b70c3dd7f8ba1846b20dda0533aae185 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -205,7 +205,7 @@ void Image::drawPattern(GraphicsContext& context, const FloatRect& floatSrcRect,
{
TRACE_EVENT0("skia", "Image::drawPattern");
- RefPtr<SkImage> image = imageForCurrentFrame();
+ sk_sp<SkImage> image = imageForCurrentFrame();
if (!image)
return;
@@ -231,7 +231,7 @@ void Image::drawPattern(GraphicsContext& context, const FloatRect& floatSrcRect,
// Fetch this now as subsetting may swap the image.
auto imageID = image->uniqueID();
- image = fromSkSp(image->makeSubset(enclosingIntRect(normSrcRect)));
+ image = image->makeSubset(enclosingIntRect(normSrcRect));
if (!image)
return;
@@ -259,14 +259,14 @@ PassRefPtr<Image> Image::imageForDefaultFrame()
bool Image::isTextureBacked()
{
- RefPtr<SkImage> image = imageForCurrentFrame();
+ sk_sp<SkImage> image = imageForCurrentFrame();
return image ? image->isTextureBacked() : false;
}
bool Image::applyShader(SkPaint& paint, const SkMatrix& localMatrix)
{
// Default shader impl: attempt to build a shader based on the current frame SkImage.
- RefPtr<SkImage> image = imageForCurrentFrame();
+ sk_sp<SkImage> image = imageForCurrentFrame();
if (!image)
return false;
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | third_party/WebKit/Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698