From 384fab467e2a5f1754ec26eecde946ce28046d20 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 7 Dec 2017 12:33:05 -0500 Subject: 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 Reviewed-by: Greg Daniel Reviewed-by: Robert Phillips --- include/gpu/GrContext.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') 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 MakeGL(const GrGLInterface*, const GrContextOptions&); - static sk_sp MakeGL(const GrGLInterface*); + static sk_sp MakeGL(sk_sp, const GrContextOptions&); + static sk_sp MakeGL(sk_sp); #ifdef SK_VULKAN - static sk_sp MakeVulkan(const GrVkBackendContext*, const GrContextOptions&); - static sk_sp MakeVulkan(const GrVkBackendContext*); + static sk_sp MakeVulkan(sk_sp, const GrContextOptions&); + static sk_sp MakeVulkan(sk_sp); #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 fGpu; const GrCaps* fCaps; GrResourceCache* fResourceCache; GrResourceProvider* fResourceProvider; -- cgit v1.2.3