Fuzz: GrContextFactory needs to stay in scope

Change-Id: I5d6bd4fae2e98e5286eefd9399292dfb926f85df
Reviewed-on: https://skia-review.googlesource.com/91701
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 38281ae..e125188 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -1792,23 +1792,22 @@
 }
 
 DEF_FUZZ(NativeGLCanvas, fuzz) {
-    GrContext* context = sk_gpu_test::GrContextFactory().get(
-            sk_gpu_test::GrContextFactory::kGL_ContextType);
+    sk_gpu_test::GrContextFactory f;
+    GrContext* context = f.get(sk_gpu_test::GrContextFactory::kGL_ContextType);
     if (!context) {
-        context = sk_gpu_test::GrContextFactory().get(
-                sk_gpu_test::GrContextFactory::kGLES_ContextType);
+        context = f.get(sk_gpu_test::GrContextFactory::kGLES_ContextType);
     }
     fuzz_ganesh(fuzz, context);
 }
 
 DEF_FUZZ(NullGLCanvas, fuzz) {
-    fuzz_ganesh(fuzz, sk_gpu_test::GrContextFactory().get(
-            sk_gpu_test::GrContextFactory::kNullGL_ContextType));
+    sk_gpu_test::GrContextFactory f;
+    fuzz_ganesh(fuzz, f.get(sk_gpu_test::GrContextFactory::kNullGL_ContextType));
 }
 
 DEF_FUZZ(DebugGLCanvas, fuzz) {
-    fuzz_ganesh(fuzz, sk_gpu_test::GrContextFactory().get(
-            sk_gpu_test::GrContextFactory::kDebugGL_ContextType));
+    sk_gpu_test::GrContextFactory f;
+    fuzz_ganesh(fuzz, f.get(sk_gpu_test::GrContextFactory::kDebugGL_ContextType));
 }
 #endif