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

Unified Diff: src/image/SkImagePriv.h

Issue 1789443002: Revert "Revert of add Make variations to return SkImage by sk_sp (patchset #5 id:80001 of https://c… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use get, not release, when calling legacy function that wants ptr Created 4 years, 9 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
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImagePriv.h
diff --git a/src/image/SkImagePriv.h b/src/image/SkImagePriv.h
index acd0beb475bdd679b3257f8d5dcfd350d7f93e38..a625472eaa03ea3dfabf8ba1606313fc55db6ba6 100644
--- a/src/image/SkImagePriv.h
+++ b/src/image/SkImagePriv.h
@@ -12,9 +12,9 @@
#include "SkSurface.h"
// Call this if you explicitly want to use/share this pixelRef in the image
-extern SkImage* SkNewImageFromPixelRef(const SkImageInfo&, SkPixelRef*,
- const SkIPoint& pixelRefOrigin,
- size_t rowBytes);
+extern sk_sp<SkImage> SkMakeImageFromPixelRef(const SkImageInfo&, SkPixelRef*,
+ const SkIPoint& pixelRefOrigin,
+ size_t rowBytes);
/**
* Examines the bitmap to decide if it can share the existing pixelRef, or
@@ -38,7 +38,8 @@ enum ForceCopyMode {
kNo_ForceCopyMode,
kYes_ForceCopyMode, // must copy the pixels even if the bitmap is immutable
};
-extern SkImage* SkNewImageFromRasterBitmap(const SkBitmap&, ForceCopyMode = kNo_ForceCopyMode);
+extern sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap&,
+ ForceCopyMode = kNo_ForceCopyMode);
// Given an image created from SkNewImageFromBitmap, return its pixelref. This
// may be called to see if the surface and the image share the same pixelref,
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698