aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/fiddle/fiddle_main.cpp
diff options
context:
space:
mode:
authorGravatar Joe Gregorio <jcgregorio@google.com>2018-05-29 13:56:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-29 18:20:46 +0000
commit8e9810ce0ff205f921e44e257adadecb7074386a (patch)
treeef511a6c8554c17f4030650f547454a4db542e4b /tools/fiddle/fiddle_main.cpp
parentbfe959872ec7895d4aa6878a9fe189c37dffc99f (diff)
[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>
Diffstat (limited to 'tools/fiddle/fiddle_main.cpp')
-rw-r--r--tools/fiddle/fiddle_main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/fiddle/fiddle_main.cpp b/tools/fiddle/fiddle_main.cpp
index 578f7cbf0c..f000025e6a 100644
--- a/tools/fiddle/fiddle_main.cpp
+++ b/tools/fiddle/fiddle_main.cpp
@@ -23,9 +23,8 @@ DEFINE_double(frame, 1.0, "A double value in [0, 1] that specifies the point in
#include "GrBackendSurface.h"
#include "GrContextPriv.h"
#include "GrGpu.h"
-
#include "GrTest.h"
-
+#include "gl/GLTestContext.h"
// Globals externed in fiddle_main.h
sk_sp<GrTexture> backingTexture; // not externed
@@ -283,7 +282,8 @@ int main(int argc, char** argv) {
rasterData = encode_snapshot(rasterSurface);
}
if (options.gpu) {
- sk_sp<GrContext> grContext = create_grcontext(gGLDriverInfo);
+ std::unique_ptr<sk_gpu_test::GLTestContext> glContext;
+ sk_sp<GrContext> grContext = create_grcontext(gGLDriverInfo, &glContext);
if (!grContext) {
fputs("Unable to get GrContext.\n", stderr);
} else {