diff options
author | 2018-05-31 14:27:17 -0400 | |
---|---|---|
committer | 2018-05-31 18:59:44 +0000 | |
commit | c7ad40f76f6f23b3acd73b53e989220fd71f2da2 (patch) | |
tree | 3a2372730179f1bd0dd2486b6e576ec308f1327b /tests/TestConfigParsing.cpp | |
parent | 8103bb960933359f6536cbfd40d760e54b079e94 (diff) |
Remove SK_SUPPORT_GPU checks in tool-only code
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).
This is almost entirely mechanical.
Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r-- | tests/TestConfigParsing.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp index df028153e2..c5f620f748 100644 --- a/tests/TestConfigParsing.cpp +++ b/tests/TestConfigParsing.cpp @@ -39,7 +39,6 @@ DEF_TEST(ParseConfigs_Gpu, reporter) { REPORTER_ASSERT(reporter, configs.count() == 1); REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gl")); REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0); -#if SK_SUPPORT_GPU REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() == GrContextFactory::kGL_ContextType); @@ -50,7 +49,6 @@ DEF_TEST(ParseConfigs_Gpu, reporter) { REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == nullptr); REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSurfType() == SkCommandLineConfigGpu::SurfType::kDefault); -#endif } DEF_TEST(ParseConfigs_OutParam, reporter) { @@ -125,7 +123,6 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == 0); } -#if SK_SUPPORT_GPU REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()); REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()); @@ -197,7 +194,6 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()); REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getSurfType() == SkCommandLineConfigGpu::SurfType::kBackendRenderTarget); -#endif } DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { @@ -220,7 +216,6 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { for (int i = 0; i < config1.count(); ++i) { REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); } -#if SK_SUPPORT_GPU REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() == GrContextFactory::kGL_ContextType); REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR()); @@ -263,7 +258,6 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { GrContextFactory::kMock_ContextType); REPORTER_ASSERT(reporter, configs[9]->asConfigGpu()->getSurfType() == SkCommandLineConfigGpu::SurfType::kBackendTexture); -#endif } DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) { @@ -290,9 +284,7 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) { for (int i = 0; i < config1.count(); ++i) { REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(config1[i])); -#if SK_SUPPORT_GPU REPORTER_ASSERT(reporter, !configs[i]->asConfigGpu()); -#endif } } @@ -309,16 +301,11 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsSurprises, reporter) { REPORTER_ASSERT(reporter, configs.count() == config1.count()); for (int i = 0; i < config1.count(); ++i) { REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); -#if SK_SUPPORT_GPU REPORTER_ASSERT(reporter, configs[i]->getBackend().equals("gpu")); REPORTER_ASSERT(reporter, configs[i]->asConfigGpu()); -#else - REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(config1[i])); -#endif } } -#if SK_SUPPORT_GPU DEF_TEST(ParseConfigs_ViaParsing, reporter) { SkCommandLineFlags::StringArray config1 = make_string_array({ "a-b-c-8888", @@ -349,7 +336,6 @@ DEF_TEST(ParseConfigs_ViaParsing, reporter) { } } } -#endif DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) { SkCommandLineFlags::StringArray config1 = make_string_array({ @@ -365,13 +351,8 @@ DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) { const char* backend; const char* vias[3]; } expectedConfigs[] = { -#if SK_SUPPORT_GPU {"gpu", {"zz", "qq", nullptr}}, {"gpu", {"abc", "nbc", "cbs"}}, -#else - {"gpu[api=gles]", {"zz", "qq", nullptr}}, - {"gpu[api=angle_d3d9_es2,samples=1]", {"abc", "nbc", "cbs"}}, -#endif {"gpu[api=gl", {"a", nullptr, nullptr}}, // Missing bracket makes this is not extended // form but via still works as expected. {"angle_gl_es2[api=gles]", {"abc", "def", nullptr}} // This is not extended form. @@ -391,10 +372,8 @@ DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) { configs[i]->getViaParts()[j].equals(expectedConfigs[i].vias[j])); } } -#if SK_SUPPORT_GPU REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()); REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu()); -#endif } |