aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-07 12:33:05 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-07 17:56:59 +0000
commit384fab467e2a5f1754ec26eecde946ce28046d20 (patch)
treec19ad170f2932c666c937736be71237c335e79b3 /include
parent1cfb6bc9b63e9840d198a1ea8b1a20da2bfde818 (diff)
sk_spification of GrGpu creation.
Make GrContext::MakeGL take interface as sk_sp. Make GrContext::MakeVulkan take GrVkBackendContext as sk_sp. Change-Id: I13c22a57bd281c51738f503d9ed3418d35a466df Reviewed-on: https://skia-review.googlesource.com/81842 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrContext.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 7b87b0a879..4aafab8cb6 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -56,12 +56,12 @@ public:
static GrContext* Create(GrBackend, GrBackendContext, const GrContextOptions& options);
static GrContext* Create(GrBackend, GrBackendContext);
- static sk_sp<GrContext> MakeGL(const GrGLInterface*, const GrContextOptions&);
- static sk_sp<GrContext> MakeGL(const GrGLInterface*);
+ static sk_sp<GrContext> MakeGL(sk_sp<const GrGLInterface>, const GrContextOptions&);
+ static sk_sp<GrContext> MakeGL(sk_sp<const GrGLInterface>);
#ifdef SK_VULKAN
- static sk_sp<GrContext> MakeVulkan(const GrVkBackendContext*, const GrContextOptions&);
- static sk_sp<GrContext> MakeVulkan(const GrVkBackendContext*);
+ static sk_sp<GrContext> MakeVulkan(sk_sp<const GrVkBackendContext>, const GrContextOptions&);
+ static sk_sp<GrContext> MakeVulkan(sk_sp<const GrVkBackendContext>);
#endif
#ifdef SK_METAL
@@ -291,8 +291,8 @@ public:
///////////////////////////////////////////////////////////////////////////
// Functions intended for internal use only.
- GrGpu* getGpu() { return fGpu; }
- const GrGpu* getGpu() const { return fGpu; }
+ GrGpu* getGpu() { return fGpu.get(); }
+ const GrGpu* getGpu() const { return fGpu.get(); }
GrAtlasGlyphCache* getAtlasGlyphCache() { return fAtlasGlyphCache; }
GrTextBlobCache* getTextBlobCache() { return fTextBlobCache.get(); }
bool abandoned() const;
@@ -344,7 +344,7 @@ public:
const GrContextPriv contextPriv() const;
private:
- GrGpu* fGpu;
+ sk_sp<GrGpu> fGpu;
const GrCaps* fCaps;
GrResourceCache* fResourceCache;
GrResourceProvider* fResourceProvider;