Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1384)

Unified Diff: tests/TestConfigParsing.cpp

Issue 1856703002: Revert of Rename enums in GrContextFactory to remove "GL" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/SkpSkGrTest.cpp ('k') | tests/VkClearTests.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TestConfigParsing.cpp
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index bdfbed4656814d6a32ecac3064dcf81aee94d465..4057a37bb091c242f992c5c992c773362f263d4a 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -41,7 +41,7 @@
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType()
- == GrContextFactory::kNativeGL_ContextType);
+ == GrContextFactory::kNative_GLContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
@@ -164,46 +164,47 @@
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() ==
- GrContextFactory::kNativeGL_ContextType);
+ GrContextFactory::kNative_GLContextType);
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_ContextType);
+ GrContextFactory::kANGLE_GLContextType);
#else
REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() ==
- GrContextFactory::kANGLE_GL_ContextType);
+ GrContextFactory::kANGLE_GL_GLContextType);
#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_ContextType);
+ GrContextFactory::kMESA_GLContextType);
#else
REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu());
#endif
#if SK_COMMAND_BUFFER
REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() ==
- GrContextFactory::kCommandBuffer_ContextType);
+ GrContextFactory::kCommandBuffer_GLContextType);
#else
REPORTER_ASSERT(reporter, !configs[4]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() ==
- GrContextFactory::kNativeGL_ContextType);
+ GrContextFactory::kNative_GLContextType);
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_ContextType);
+ GrContextFactory::kGLES_GLContextType);
REPORTER_ASSERT(reporter, !configs[6]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[6]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[6]->asConfigGpu()->getSamples() == 0);
+
#endif
}
@@ -235,13 +236,16 @@
}
}
+
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)",
- "gpu(api=debug)", "gpu(api=gl)", "gpu(api=gles)", ""
- "gpu", "gpu()", "gpu(samples=0)", "gpu(api=gles,samples=0)"
+ // 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)"
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
« no previous file with comments | « tests/SkpSkGrTest.cpp ('k') | tests/VkClearTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698