[fiddle] Init gpu using the GLTestContext.

The previous way was failing with SwiftShader.

Bug: skia:
Change-Id: I6f3937d4d3bc36851476e29be891dc0a38871ef0
Reviewed-on: https://skia-review.googlesource.com/130325
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/tools/fiddle/fiddle_main.h b/tools/fiddle/fiddle_main.h
index 5492a42..ca41998 100644
--- a/tools/fiddle/fiddle_main.h
+++ b/tools/fiddle/fiddle_main.h
@@ -20,6 +20,7 @@
     #include "skia.h"
 #endif
 
+#include <memory>
 #include <sstream>
 
 extern GrBackendTexture backEndTexture;
@@ -30,6 +31,10 @@
 extern double duration; // The total duration of the animation in seconds.
 extern double frame;    // A value in [0, 1] of where we are in the animation.
 
+namespace sk_gpu_test {
+class GLTestContext;
+}
+
 struct DrawOptions {
     DrawOptions(int w, int h, bool r, bool g, bool p, bool k, bool srgb, bool f16,
                 bool textOnly, const char* s,
@@ -86,6 +91,7 @@
 
 // There are different implementations of create_grcontext() for EGL, Mesa,
 // and a fallback to a null context.
-extern sk_sp<GrContext> create_grcontext(std::ostringstream &driverinfo);
+extern sk_sp<GrContext> create_grcontext(std::ostringstream& driverinfo,
+                                         std::unique_ptr<sk_gpu_test::GLTestContext>* glContext);
 
 #endif  // fiddle_main_DEFINED