diff options
author | robertphillips <robertphillips@google.com> | 2016-03-17 14:31:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-17 14:31:39 -0700 |
commit | 37bd7c3aca66697fff2db79c21771a0b3cbe3b4c (patch) | |
tree | daea856d5a7804f753abb63686e1e0f11a03452f /src/core/SkSpecialSurface.h | |
parent | fc0b6d1053bb56698f2844bd5ca30bced7bb389d (diff) |
Switch SkSpecialImage & SkSpecialSurface classes over to smart pointers
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812023002
Review URL: https://codereview.chromium.org/1812023002
Diffstat (limited to 'src/core/SkSpecialSurface.h')
-rw-r--r-- | src/core/SkSpecialSurface.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/core/SkSpecialSurface.h b/src/core/SkSpecialSurface.h index 546ec0c303..098baa42dd 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*); |