Move SkGLContext and some GrGLInterface implementations to skgputest module

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

Review URL: https://codereview.chromium.org/1815823002
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index c0f674f..235de02 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -56,6 +56,9 @@
     #include "gl/GrGLDefines.h"
     #include "GrCaps.h"
     #include "GrContextFactory.h"
+    #include "gl/GrGLUtil.h"
+    using sk_gpu_test::GrContextFactory;
+    using sk_gpu_test::GLContext;
     SkAutoTDelete<GrContextFactory> gGrFactory;
 #endif
 
@@ -155,21 +158,21 @@
 #if SK_SUPPORT_GPU
 struct GPUTarget : public Target {
     explicit GPUTarget(const Config& c) : Target(c), gl(nullptr) { }
-    SkGLContext* gl;
+    GLContext* gl;
 
     void setup() override {
         this->gl->makeCurrent();
         // Make sure we're done with whatever came before.
-        SK_GL(*this->gl, Finish());
+        GR_GL_CALL(this->gl->gl(), Finish());
     }
     void endTiming() override {
         if (this->gl) {
-            SK_GL(*this->gl, Flush());
+            GR_GL_CALL(this->gl->gl(), Flush());
             this->gl->waitOnSyncOrSwap();
         }
     }
     void fence() override {
-        SK_GL(*this->gl, Finish());
+        GR_GL_CALL(this->gl->gl(), Finish());
     }
 
     bool needsFrameTiming(int* maxFrameLag) const override {
@@ -200,16 +203,16 @@
     }
     void fillOptions(ResultsWriter* log) override {
         const GrGLubyte* version;
-        SK_GL_RET(*this->gl, version, GetString(GR_GL_VERSION));
+        GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_VERSION));
         log->configOption("GL_VERSION", (const char*)(version));
 
-        SK_GL_RET(*this->gl, version, GetString(GR_GL_RENDERER));
+        GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_RENDERER));
         log->configOption("GL_RENDERER", (const char*) version);
 
-        SK_GL_RET(*this->gl, version, GetString(GR_GL_VENDOR));
+        GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_VENDOR));
         log->configOption("GL_VENDOR", (const char*) version);
 
-        SK_GL_RET(*this->gl, version, GetString(GR_GL_SHADING_LANGUAGE_VERSION));
+        GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_SHADING_LANGUAGE_VERSION));
         log->configOption("GL_SHADING_LANGUAGE_VERSION", (const char*) version);
     }
 };