Followup fixes to gm bindings

Change-Id: If896d8a06fcf1bf1859a486f16e9f56fd184c0c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459196
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Kevin Lubick 2021-10-13 14:21:27 -04:00
parent 1d910efd24
commit 9a5762052a

View File

@ -73,7 +73,7 @@ static sk_sp<GrDirectContext> MakeGrContext(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE cont
// setup GrDirectContext
auto interface = GrGLMakeNativeInterface();
// setup contexts
sk_sp<GrDirectContext> dContext(GrDirectContext::MakeGL(interface));
sk_sp<GrDirectContext> dContext((GrDirectContext::MakeGL(interface)));
return dContext;
}
@ -204,15 +204,15 @@ static JSArray ListTests() {
SkDebugf("Listing Tests\n");
JSArray tests = emscripten::val::array();
for (auto test : skiatest::TestRegistry::Range()) {
SkDebugf("test %s\n", test.name);
tests.call<void>("push", std::string(test.name));
SkDebugf("test %s\n", test.fName);
tests.call<void>("push", std::string(test.fName));
}
return tests;
}
static skiatest::Test getTestWithName(std::string name, bool* ok) {
for (auto test : skiatest::TestRegistry::Range()) {
if (name == test.name) {
if (name == test.fName) {
*ok = true;
return test;
}
@ -249,7 +249,7 @@ static JSObject RunTest(std::string name) {
return result;
}
GrContextOptions grOpts;
if (test.needsGpu) {
if (test.fNeedsGpu) {
result.set("result", "passed"); // default to passing - the reporter will mark failed.
WasmReporter reporter(name, result);
test.modifyGrContextOptions(&grOpts);