diff options
Diffstat (limited to 'src/gpu/gl/GrGLAssembleInterface.cpp')
-rw-r--r-- | src/gpu/gl/GrGLAssembleInterface.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp index b7698f1473..c5e99015e0 100644 --- a/src/gpu/gl/GrGLAssembleInterface.cpp +++ b/src/gpu/gl/GrGLAssembleInterface.cpp @@ -15,7 +15,7 @@ #define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL ## F = (GrEGL ## F ## Proc) get(ctx, "egl" #F #S) -const GrGLInterface* GrGLAssembleInterface(void* ctx, GrGLGetProc get) { +sk_sp<const GrGLInterface> GrGLAssembleInterface(void* ctx, GrGLGetProc get) { GET_PROC_LOCAL(GetString); if (nullptr == GetString) { return nullptr; @@ -51,7 +51,7 @@ static void get_egl_query_and_display(GrEGLQueryStringProc* queryString, GrEGLDi } } -const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { +sk_sp<const GrGLInterface> GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { GET_PROC_LOCAL(GetString); GET_PROC_LOCAL(GetStringi); GET_PROC_LOCAL(GetIntegerv); @@ -78,7 +78,7 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { return nullptr; } - GrGLInterface* interface = new GrGLInterface(); + sk_sp<GrGLInterface> interface(new GrGLInterface()); GrGLInterface::Functions* functions = &interface->fFunctions; GET_PROC(ActiveTexture); @@ -315,7 +315,6 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { } } else { // we must have FBOs - delete interface; return nullptr; } @@ -547,7 +546,7 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { return interface; } -const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) { +sk_sp<const GrGLInterface> GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) { GET_PROC_LOCAL(GetString); if (nullptr == GetString) { return nullptr; @@ -571,7 +570,7 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) { return nullptr; } - GrGLInterface* interface = new GrGLInterface; + sk_sp<GrGLInterface> interface(new GrGLInterface); GrGLInterface::Functions* functions = &interface->fFunctions; GET_PROC(ActiveTexture); |