aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TestConfigParsing.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-04-05 11:06:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-05 11:06:27 -0700
commit85b4b53e78dcdeae2a51935ca5e214b0f1a06492 (patch)
tree909cb8ef0862154b2e6bc6c66e0e40cd5d018bae /tests/TestConfigParsing.cpp
parent3a15fd4a9a019dc781368c26499ff899c2f03e3f (diff)
Rename enums in GrContextFactory to remove "GL"
Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004 Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb Review URL: https://codereview.chromium.org/1845923004
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r--tests/TestConfigParsing.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 301f6a2d9a..ac7037f9d2 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -41,7 +41,7 @@ DEF_TEST(ParseConfigs_Gpu, reporter) {
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType()
- == GrContextFactory::kNative_GLContextType);
+ == GrContextFactory::kNativeGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
@@ -184,48 +184,48 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() ==
- GrContextFactory::kNative_GLContextType);
+ GrContextFactory::kNativeGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
#if SK_ANGLE
#ifdef SK_BUILD_FOR_WIN
REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()->getContextType() ==
- GrContextFactory::kANGLE_GLContextType);
+ GrContextFactory::kANGLE_ContextType);
#else
REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() ==
- GrContextFactory::kANGLE_GL_GLContextType);
+ GrContextFactory::kANGLE_GL_ContextType);
#else
REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu());
#endif
#if SK_MESA
REPORTER_ASSERT(reporter, configs[3]->asConfigGpu()->getContextType() ==
- GrContextFactory::kMESA_GLContextType);
+ GrContextFactory::kMESA_ContextType);
#else
REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu());
#endif
#if SK_COMMAND_BUFFER
REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() ==
- GrContextFactory::kCommandBuffer_GLContextType);
+ GrContextFactory::kCommandBuffer_ContextType);
#else
REPORTER_ASSERT(reporter, !configs[4]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() ==
- GrContextFactory::kNative_GLContextType);
+ GrContextFactory::kNativeGL_ContextType);
REPORTER_ASSERT(reporter, !configs[5]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[5]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[6]->asConfigGpu()->getContextType() ==
- GrContextFactory::kGLES_GLContextType);
+ GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, !configs[6]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[6]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[6]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getContextType() ==
- GrContextFactory::kGL_GLContextType);
+ GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0);
@@ -260,16 +260,13 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) {
}
}
-
DEF_TEST(ParseConfigs_ExtendedGpuConfigsSurprises, reporter) {
// These just list explicitly some properties of the system.
SkCommandLineFlags::StringArray config1 = make_string_array({
// Options are not canonized -> two same configs have a different tag.
"gpu(nvpr=true,dit=true)", "gpu(dit=true,nvpr=true)",
- // API native is alias for gl or gles, but it's not canonized -> different tag.
- "gpu(api=native)", "gpu(api=gl)", "gpu(api=gles)", ""
- // Default values are not canonized -> different tag.
- "gpu", "gpu()", "gpu(samples=0)", "gpu(api=native,samples=0)"
+ "gpu(api=debug)", "gpu(api=gl)", "gpu(api=gles)", ""
+ "gpu", "gpu()", "gpu(samples=0)", "gpu(api=gles,samples=0)"
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);