SkQP: Use SK_GL macro

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I9978cb3c2a2dc726a46d0377f84fceb879b73917
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
Hal Canary 2019-08-28 09:10:32 -04:00 committed by Skia Commit-Bot
parent b1ade2a426
commit a67523ae67

View File

@ -135,10 +135,13 @@ static void get_render_tests(SkQPAssetManager* mgr,
static std::unique_ptr<sk_gpu_test::TestContext> make_test_context(SkQP::SkiaBackend backend) { static std::unique_ptr<sk_gpu_test::TestContext> make_test_context(SkQP::SkiaBackend backend) {
using U = std::unique_ptr<sk_gpu_test::TestContext>; using U = std::unique_ptr<sk_gpu_test::TestContext>;
switch (backend) { switch (backend) {
// TODO(halcanary): Fuchsia will have SK_SUPPORT_GPU and SK_VULKAN, but *not* SK_GL.
#ifdef SK_GL
case SkQP::SkiaBackend::kGL: case SkQP::SkiaBackend::kGL:
return U(sk_gpu_test::CreatePlatformGLTestContext(kGL_GrGLStandard, nullptr)); return U(sk_gpu_test::CreatePlatformGLTestContext(kGL_GrGLStandard, nullptr));
case SkQP::SkiaBackend::kGLES: case SkQP::SkiaBackend::kGLES:
return U(sk_gpu_test::CreatePlatformGLTestContext(kGLES_GrGLStandard, nullptr)); return U(sk_gpu_test::CreatePlatformGLTestContext(kGLES_GrGLStandard, nullptr));
#endif
#ifdef SK_VULKAN #ifdef SK_VULKAN
case SkQP::SkiaBackend::kVulkan: case SkQP::SkiaBackend::kVulkan:
return U(sk_gpu_test::CreatePlatformVkTestContext(nullptr)); return U(sk_gpu_test::CreatePlatformVkTestContext(nullptr));
@ -161,10 +164,12 @@ static GrContextOptions context_options(skiagm::GM* gm = nullptr) {
static std::vector<SkQP::SkiaBackend> get_backends() { static std::vector<SkQP::SkiaBackend> get_backends() {
std::vector<SkQP::SkiaBackend> result; std::vector<SkQP::SkiaBackend> result;
SkQP::SkiaBackend backends[] = { SkQP::SkiaBackend backends[] = {
#ifdef SK_GL
#ifndef SK_BUILD_FOR_ANDROID #ifndef SK_BUILD_FOR_ANDROID
SkQP::SkiaBackend::kGL, // Used for testing on desktop machines. SkQP::SkiaBackend::kGL, // Used for testing on desktop machines.
#endif #endif
SkQP::SkiaBackend::kGLES, SkQP::SkiaBackend::kGLES,
#endif // SK_GL
#ifdef SK_VULKAN #ifdef SK_VULKAN
SkQP::SkiaBackend::kVulkan, SkQP::SkiaBackend::kVulkan,
#endif #endif