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

Unified Diff: src/gpu/SkGpuDevice.h

Issue 1925803004: Add sk_sp to SkSurface_Gpu and SkGpuDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issues Created 4 years, 8 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/SkSpecialSurface.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.h
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index 8420449a9aae544b079ced402736c7d9731dfa1c..1e025670efd6639c4532471afb32deecd50597e3 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 {}
« no previous file with comments | « src/core/SkSpecialSurface.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698