diff options
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index c11f598b7a..ddb80b4b62 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -184,7 +184,12 @@ sk_sp<GrGpu> GrGLGpu::Make(GrBackendContext backendContext, const GrContextOptio sk_sp<GrGpu> GrGLGpu::Make(sk_sp<const GrGLInterface> interface, const GrContextOptions& options, GrContext* context) { if (!interface) { - interface.reset(GrGLDefaultInterface()); + interface = GrGLMakeNativeInterface(); + // For clients that have written their own GrGLCreateNativeInterface and haven't yet updated + // to GrGLMakeNativeInterface. + if (!interface) { + interface = sk_ref_sp(GrGLCreateNativeInterface()); + } if (!interface) { return nullptr; } |