Convert some unit tests from NullGL to Mock context
Bug: skia:
Change-Id: I6ecfed3f7ee096f85ea4cb4920e1029227d36169
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203703
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index 0733bde..435459b 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -975,16 +975,13 @@
TEST_ASSERT(blendInfo.fWriteColor);
}
-// The NullGL context does not work correctly if the GL interface/validation
-// logic is disabled.
-#if !SK_DISABLE_GL_INTERFACE
DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, options) {
GrContextOptions opts = options;
opts.fSuppressDualSourceBlending = true;
sk_gpu_test::GrContextFactory mockFactory(opts);
- GrContext* ctx = mockFactory.get(sk_gpu_test::GrContextFactory::kNullGL_ContextType);
+ GrContext* ctx = mockFactory.get(sk_gpu_test::GrContextFactory::kMock_ContextType);
if (!ctx) {
- SK_ABORT("Failed to create null context without ARB_blend_func_extended.");
+ SK_ABORT("Failed to create mock context without ARB_blend_func_extended.");
return;
}
@@ -992,7 +989,7 @@
GrProxyProvider* proxyProvider = ctx->priv().proxyProvider();
const GrCaps& caps = *ctx->priv().caps();
if (caps.shaderCaps()->dualSourceBlendingSupport()) {
- SK_ABORT("Null context failed to honor request for no ARB_blend_func_extended.");
+ SK_ABORT("Mock context failed to honor request for no ARB_blend_func_extended.");
return;
}
@@ -1032,4 +1029,3 @@
}
gpu->deleteTestingOnlyBackendTexture(backendTex);
}
-#endif