aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz/FuzzCanvas.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-01-05 16:59:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-08 14:08:49 +0000
commit549be4aa184d445ef66b1934582ca6f07e83b31e (patch)
treea439144b714a71fd83c04ae197de79ccb98029e3 /fuzz/FuzzCanvas.cpp
parent3c7d882c483b693124f94c07253807422583080f (diff)
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>
Diffstat (limited to 'fuzz/FuzzCanvas.cpp')
-rw-r--r--fuzz/FuzzCanvas.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 38281ae97c..e125188e70 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -1792,23 +1792,22 @@ static void fuzz_ganesh(Fuzz* fuzz, GrContext* context) {
}
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