diff options
author | 2016-04-29 06:46:36 -0700 | |
---|---|---|
committer | 2016-04-29 06:46:36 -0700 | |
commit | 24e912869499352e8947d3943acb43edd7ffded6 (patch) | |
tree | 44f487f18b3e241bfd28370f747c5cfe2cedeb7b /src/gpu/SkGpuDevice.h | |
parent | efe46d20949efbc59bedd1f28e6f42a0dd069688 (diff) |
Add sk_sp to SkSurface_Gpu and SkGpuDevice
Split off of https://codereview.chromium.org/1930013002/ ((Mostly) Retract GrRenderTarget from SkGpuDevice)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925803004
Review-Url: https://codereview.chromium.org/1925803004
Diffstat (limited to 'src/gpu/SkGpuDevice.h')
-rw-r--r-- | src/gpu/SkGpuDevice.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index 8420449a9a..1e025670ef 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h @@ -37,22 +37,24 @@ public: /** * Creates an SkGpuDevice from a GrRenderTarget. */ - static SkGpuDevice* Create(GrRenderTarget* target, const SkSurfaceProps*, InitContents); + static sk_sp<SkGpuDevice> Make(sk_sp<GrRenderTarget> target, + const SkSurfaceProps*, + InitContents); /** * Creates an SkGpuDevice from a GrRenderTarget whose texture width/height is * different than its actual width/height (e.g., approx-match scratch texture). */ - static SkGpuDevice* Create(GrRenderTarget* target, int width, int height, - const SkSurfaceProps*, InitContents); + static sk_sp<SkGpuDevice> Make(sk_sp<GrRenderTarget> target, int width, int height, + const SkSurfaceProps*, InitContents); /** * New device that will create an offscreen renderTarget based on the ImageInfo and * sampleCount. The Budgeted param controls whether the device's backing store counts against * the resource cache budget. On failure, returns nullptr. */ - static SkGpuDevice* Create(GrContext*, SkBudgeted, const SkImageInfo&, - int sampleCount, const SkSurfaceProps*, InitContents); + static sk_sp<SkGpuDevice> Make(GrContext*, SkBudgeted, const SkImageInfo&, + int sampleCount, const SkSurfaceProps*, InitContents); ~SkGpuDevice() override {} |