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

Unified Diff: src/core/SkSpecialSurface.h

Issue 1812023002: Switch SkSpecialImage & SkSpecialSurface classes over to smart pointers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix build 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/core/SkSpecialImage.cpp ('k') | src/core/SkSpecialSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialSurface.h
diff --git a/src/core/SkSpecialSurface.h b/src/core/SkSpecialSurface.h
index 546ec0c303ca956be01965c9e965be42d76f1519..098baa42dd0a9e1e77b10b555dbc9830cb625f05 100644
--- a/src/core/SkSpecialSurface.h
+++ b/src/core/SkSpecialSurface.h
@@ -48,29 +48,29 @@ public:
*
* Note: the caller inherits a ref from this call that must be balanced
*/
- SkSpecialImage* newImageSnapshot();
+ sk_sp<SkSpecialImage> makeImageSnapshot();
/**
* Use an existing (renderTarget-capable) GrTexture as the backing store.
*/
- static SkSpecialSurface* NewFromTexture(SkImageFilter::Proxy* proxy,
- const SkIRect& subset, GrTexture*,
- const SkSurfaceProps* = nullptr);
+ static sk_sp<SkSpecialSurface> MakeFromTexture(SkImageFilter::Proxy* proxy,
+ const SkIRect& subset, GrTexture*,
+ const SkSurfaceProps* = nullptr);
/**
* Allocate a new GPU-backed SkSpecialSurface. If the requested surface cannot
* be created, nullptr will be returned.
*/
- static SkSpecialSurface* NewRenderTarget(SkImageFilter::Proxy* proxy,
- GrContext*, const GrSurfaceDesc&,
- const SkSurfaceProps* = nullptr);
+ static sk_sp<SkSpecialSurface> MakeRenderTarget(SkImageFilter::Proxy* proxy,
+ GrContext*, const GrSurfaceDesc&,
+ const SkSurfaceProps* = nullptr);
/**
* Use and existing SkBitmap as the backing store.
*/
- static SkSpecialSurface* NewFromBitmap(SkImageFilter::Proxy* proxy,
- const SkIRect& subset, SkBitmap& bm,
- const SkSurfaceProps* = nullptr);
+ static sk_sp<SkSpecialSurface> MakeFromBitmap(SkImageFilter::Proxy* proxy,
+ const SkIRect& subset, SkBitmap& bm,
+ const SkSurfaceProps* = nullptr);
/**
* Return a new CPU-backed surface, with the memory for the pixels automatically
@@ -79,8 +79,9 @@ public:
* If the requested surface cannot be created, or the request is not a
* supported configuration, nullptr will be returned.
*/
- static SkSpecialSurface* NewRaster(SkImageFilter::Proxy* proxy,
- const SkImageInfo&, const SkSurfaceProps* = nullptr);
+ static sk_sp<SkSpecialSurface> MakeRaster(SkImageFilter::Proxy* proxy,
+ const SkImageInfo&,
+ const SkSurfaceProps* = nullptr);
protected:
SkSpecialSurface(SkImageFilter::Proxy*, const SkIRect& subset, const SkSurfaceProps*);
« no previous file with comments | « src/core/SkSpecialImage.cpp ('k') | src/core/SkSpecialSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698