Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.
Removes the concept of a configurable "default" interface and makes the default
always be the "native" interface.
Also removes unused functions: GrGLInterfaceAddTestDebugMarker and
GrGLInterface::NewClone.
Keeps around legacy GrGLCreateNativeInterface() until clients can be weened.
Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb
Reviewed-on: https://skia-review.googlesource.com/83000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tools/gpu/gl/null/NullGLTestContext.cpp b/tools/gpu/gl/null/NullGLTestContext.cpp
index 9e7279b..de33a40 100644
--- a/tools/gpu/gl/null/NullGLTestContext.cpp
+++ b/tools/gpu/gl/null/NullGLTestContext.cpp
@@ -17,8 +17,10 @@
namespace {
class NullGLContext : public sk_gpu_test::GLTestContext {
public:
- NullGLContext(bool enableNVPR) { this->init(GrGLCreateNullInterface(enableNVPR)); }
- ~NullGLContext() override { this->teardown(); }
+ NullGLContext(bool enableNVPR) {
+ this->init(sk_sp<const GrGLInterface>(GrGLCreateNullInterface(enableNVPR)));
+ }
+ ~NullGLContext() override { this->teardown(); }
private:
void onPlatformMakeCurrent() const override {}