diff options
author | robertphillips <robertphillips@google.com> | 2016-04-25 12:32:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-25 12:32:55 -0700 |
commit | c91fd3447e1d3452d5e43e70e371896c80645b61 (patch) | |
tree | ec9a701b992bf549c2c220042fa44ce5c8cd8633 /src/core/SkSpecialImage.h | |
parent | 1eca11659e217eca138c230525a52deb3d52b2d3 (diff) |
Add another dollop of sk_sp to SkSpecialImage and SkSpecialSurface
This is split out of https://codereview.chromium.org/1914883002/ (Refactor drawContext/RenderTarget creation)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1913743002
Review URL: https://codereview.chromium.org/1913743002
Diffstat (limited to 'src/core/SkSpecialImage.h')
-rw-r--r-- | src/core/SkSpecialImage.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h index d6497a035e..6771f257e3 100644 --- a/src/core/SkSpecialImage.h +++ b/src/core/SkSpecialImage.h @@ -73,11 +73,13 @@ public: static sk_sp<SkSpecialImage> MakeFromRaster(const SkIRect& subset, const SkBitmap&, const SkSurfaceProps* = nullptr); +#if SK_SUPPORT_GPU static sk_sp<SkSpecialImage> MakeFromGpu(const SkIRect& subset, uint32_t uniqueID, - GrTexture*, + sk_sp<GrTexture>, const SkSurfaceProps* = nullptr, SkAlphaType at = kPremul_SkAlphaType); +#endif static sk_sp<SkSpecialImage> MakeFromPixmap(const SkIRect& subset, const SkPixmap&, RasterReleaseProc, @@ -123,11 +125,13 @@ public: */ GrContext* getContext() const; +#if SK_SUPPORT_GPU /** * Regardless of the underlying backing store, return the contents as a GrTexture. * The active portion of the texture can be retrieved via 'subset'. */ - GrTexture* asTextureRef(GrContext*) const; + sk_sp<GrTexture> asTextureRef(GrContext*) const; +#endif // TODO: hide this whe the imagefilter all have a consistent draw path (see skbug.com/5063) /** |