diff options
-rw-r--r-- | include/gpu/GrContext.h | 3 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 4aafab8cb6..32bee50297 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -58,6 +58,9 @@ public: static sk_sp<GrContext> MakeGL(sk_sp<const GrGLInterface>, const GrContextOptions&); static sk_sp<GrContext> MakeGL(sk_sp<const GrGLInterface>); + // Deprecated + static sk_sp<GrContext> MakeGL(const GrGLInterface*); + static sk_sp<GrContext> MakeGL(const GrGLInterface*, const GrContextOptions&); #ifdef SK_VULKAN static sk_sp<GrContext> MakeVulkan(sk_sp<const GrVkBackendContext>, const GrContextOptions&); diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index e8f5c4b889..eaacdb1cad 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -94,6 +94,15 @@ sk_sp<GrContext> GrContext::MakeGL(sk_sp<const GrGLInterface> interface, return context; } +sk_sp<GrContext> GrContext::MakeGL(const GrGLInterface* interface) { + return MakeGL(sk_ref_sp(interface)); +} + +sk_sp<GrContext> GrContext::MakeGL(const GrGLInterface* interface, + const GrContextOptions& options) { + return MakeGL(sk_ref_sp(interface), options); +} + sk_sp<GrContext> GrContext::MakeMock(const GrMockOptions* mockOptions) { GrContextOptions defaultOptions; return MakeMock(mockOptions, defaultOptions); |