aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TestConfigParsing.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-20 08:54:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-20 13:31:49 +0000
commit6405e71279e99731f89db69325c6763ec62a98e1 (patch)
treef1ce7b3cc37ec3e9f9f4f135655376fd30174753 /tests/TestConfigParsing.cpp
parent5e21e0991968271ee37f446de7e08620ad1b50bb (diff)
Remove gpu configs that don't have explicit API.
DOCS_PREVIEW= https://skia.org/?cl=9871 Change-Id: I510473cf91d8bee38d1e33424b1ae7b30dc86968 Reviewed-on: https://skia-review.googlesource.com/9871 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r--tests/TestConfigParsing.cpp168
1 files changed, 81 insertions, 87 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 0f884d160c..8cc3df272f 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -31,18 +31,18 @@ SkCommandLineFlags::StringArray make_string_array(std::initializer_list<const ch
}
DEF_TEST(ParseConfigs_Gpu, reporter) {
// Parses a normal config and returns correct "tag".
- // Gpu config defaults work.
- SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"});
+ // Simple GL config works
+ SkCommandLineFlags::StringArray config1 = make_string_array({"gl"});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
- REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu"));
+ 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::kNativeGL_ContextType);
+ == GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseInstanced() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
@@ -54,11 +54,11 @@ DEF_TEST(ParseConfigs_Gpu, reporter) {
DEF_TEST(ParseConfigs_OutParam, reporter) {
// Clears the out parameter.
- SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"});
+ SkCommandLineFlags::StringArray config1 = make_string_array({"gles"});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
- REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu"));
+ REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gles"));
SkCommandLineFlags::StringArray config2 = make_string_array({"8888"});
ParseConfigs(config2, &configs);
@@ -75,10 +75,10 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
// Parses all default configs and returns correct "tag".
SkCommandLineFlags::StringArray config1 = make_string_array({
- "565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "glmsaa16", "glmsaa4",
- "nonrendering", "null", "nullgpu", "glnvpr16", "glnvpr4", "glnvprdit16", "glesnvprdit4",
+ "565", "8888", "debuggl", "gl", "gldft", "nullgl", "glmsaa16", "glmsaa4",
+ "nonrendering", "nullgl", "gles", "glnvpr16", "glnvpr4", "glnvprdit16", "glesnvprdit4",
"pdf", "skp", "svg", "xps", "angle_d3d11_es2", "angle_gl_es2", "commandbuffer", "mesa",
- "hwui", "gpuf16", "gpusrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk",
+ "hwui", "glf16", "glessrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk",
"glinst", "glinst4", "glinstdit4", "glinst16", "glinstdit16", "glesinst", "glesinst4",
"glesinstdit4", "glwide", "glnarrow"
});
@@ -98,122 +98,120 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[3]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[4]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[6]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 16);
- REPORTER_ASSERT(reporter, configs[8]->asConfigGpu()->getSamples() == 4);
- REPORTER_ASSERT(reporter, !configs[9]->asConfigGpu());
- REPORTER_ASSERT(reporter, !configs[10]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[11]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[12]->asConfigGpu()->getSamples() == 16);
+ REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, configs[5]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[6]->asConfigGpu()->getSamples() == 16);
+ REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, !configs[8]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[9]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[10]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[11]->asConfigGpu()->getSamples() == 16);
+ REPORTER_ASSERT(reporter, configs[11]->asConfigGpu()->getUseNVPR());
+ REPORTER_ASSERT(reporter, !configs[11]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, configs[12]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[12]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[12]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[13]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, configs[13]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[13]->asConfigGpu()->getUseNVPR());
- REPORTER_ASSERT(reporter, !configs[13]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 16);
+ REPORTER_ASSERT(reporter, configs[13]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getSamples() == 4);
- REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR());
- REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, !configs[15]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu());
- REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu());
- REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
- REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace());
- REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gammaIsLinear());
+ REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[24]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
+ REPORTER_ASSERT(reporter, configs[24]->asConfigGpu()->getColorSpace());
+ REPORTER_ASSERT(reporter, configs[24]->asConfigGpu()->getColorSpace()->gammaIsLinear());
const SkMatrix44* srgbXYZ = as_CSB(srgbColorSpace)->toXYZD50();
SkASSERT(srgbXYZ);
const SkMatrix44* config25XYZ =
- as_CSB(configs[25]->asConfigGpu()->getColorSpace())->toXYZD50();
+ as_CSB(configs[24]->asConfigGpu()->getColorSpace())->toXYZD50();
SkASSERT(config25XYZ);
REPORTER_ASSERT(reporter, *config25XYZ == *srgbXYZ);
- REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
- REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
- REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
- REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace());
- REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gammaIsLinear());
+ REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
+ REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
+ REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
+ REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getColorSpace());
+ REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getColorSpace()->gammaIsLinear());
const SkMatrix44* config41XYZ =
- as_CSB(configs[41]->asConfigGpu()->getColorSpace())->toXYZD50();
+ as_CSB(configs[40]->asConfigGpu()->getColorSpace())->toXYZD50();
SkASSERT(config41XYZ);
REPORTER_ASSERT(reporter, *config41XYZ != *srgbXYZ);
- REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() ==
+ REPORTER_ASSERT(reporter, configs[32]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
- REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
- REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace());
- REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace()->gammaIsLinear());
- REPORTER_ASSERT(reporter, *as_CSB(configs[42]->asConfigGpu()->getColorSpace())->toXYZD50() !=
+ REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
+ REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace());
+ REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gammaIsLinear());
+ REPORTER_ASSERT(reporter, *as_CSB(configs[41]->asConfigGpu()->getColorSpace())->toXYZD50() !=
*as_CSB(srgbColorSpace)->toXYZD50());
+ REPORTER_ASSERT(reporter, configs[32]->asConfigGpu()->getUseInstanced());
+ REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() ==
+ GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced());
+ REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseInstanced());
+ REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseInstanced());
- REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getUseInstanced());
+ REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getContextType() ==
- GrContextFactory::kGL_ContextType);
+ GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getUseInstanced());
- REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getContextType() ==
GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getUseInstanced());
+ REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getContextType() ==
GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getUseInstanced());
+ REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getSamples() == 4);
- REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getContextType() ==
- GrContextFactory::kGLES_ContextType);
- REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseInstanced());
- REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, configs[19]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[20]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[21]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[22]->asConfigGpu());
#if SK_MESA
REPORTER_ASSERT(reporter, configs[23]->asConfigGpu());
#else
- REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu());
+ REPORTER_ASSERT(reporter, !configs[22]->asConfigGpu());
#endif
+ REPORTER_ASSERT(reporter, configs[26]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[27]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, configs[28]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getUseNVPR());
+ REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[29]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getSamples() == 4);
- REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseNVPR());
- REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
+ REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
REPORTER_ASSERT(reporter, configs[30]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
- REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
- REPORTER_ASSERT(reporter, configs[31]->asConfigGpu());
- REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getSamples() == 4);
#ifdef SK_VULKAN
- REPORTER_ASSERT(reporter, configs[32]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[31]->asConfigGpu());
#endif
#endif
}
DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
- "gpu[nvpr=true,dit=false]",
+ "gpu[api=gl,nvpr=true,dit=false]",
"gpu[api=angle_d3d9_es2]",
"gpu[api=angle_gl_es3]",
"gpu[api=mesa,samples=77]",
"gpu[dit=true,api=commandbuffer]",
- "gpu[]",
"gpu[api=gles]",
"gpu[api=gl]",
"gpu[api=vulkan]",
@@ -227,7 +225,7 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() ==
- GrContextFactory::kNativeGL_ContextType);
+ GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
@@ -245,24 +243,18 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
#endif
REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() ==
GrContextFactory::kCommandBuffer_ContextType);
-
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() ==
- GrContextFactory::kNativeGL_ContextType);
+ GrContextFactory::kGLES_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_ContextType);
+ GrContextFactory::kGL_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_ContextType);
- REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseNVPR());
- REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText());
- REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0);
#ifdef SK_VULKAN
- REPORTER_ASSERT(reporter, configs[8]->asConfigGpu()->getContextType() ==
+ REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getContextType() ==
GrContextFactory::kVulkan_ContextType);
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText());
@@ -273,15 +265,17 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
- "gpu[nvpr=1]", // Number as bool.
+ "gpu[api=gl,nvpr=1]", // Number as bool.
"gpu[api=gl,]", // Trailing in comma.
"gpu[api=angle_glu]", // Unknown api.
"gpu[api=,samples=0]", // Empty api.
- "gpu[samples=true]", // Value true as a number.
- "gpu[samples=0,samples=0]", // Duplicate option key.
- "gpu[,samples=0]", // Leading comma.
+ "gpu[api=gl,samples=true]", // Value true as a number.
+ "gpu[api=gl,samples=0,samples=0]", // Duplicate option key.
+ "gpu[,api=gl,samples=0]", // Leading comma.
"gpu[samples=54", // Missing closing parenthesis.
",,",
+ "gpu[]", // Missing required api specifier
+ "gpu[samples=4]", // Missing required api specifier
"gpu[", // Missing bracket.
"samples=54" // No backend.
"gpu[nvpr=true ]", // Space.
@@ -303,9 +297,9 @@ 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]"
+ "gpu[api=gl,nvpr=true,dit=true]", "gpu[api=gl,dit=true,nvpr=true]",
+ "gpu[api=debuggl]", "gpu[api=gl]", "gpu[api=gles]", ""
+ "gpu[api=gl]", "gpu[api=gl,samples=0]", "gpu[api=gles,samples=0]"
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
@@ -355,8 +349,8 @@ DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"zz-qq-gpu[api=gles]",
"abc-nbc-cbs-gpu[api=angle_d3d9_es2,samples=1]",
- "a-gpu[samples=1",
- "abc-def-angle_gl_es2[samples=1]",
+ "a-gpu[api=gl",
+ "abc-def-angle_gl_es2[api=gles]",
});
SkCommandLineConfigArray configs;
@@ -372,11 +366,11 @@ DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) {
{"gpu[api=gles]", {"zz", "qq", nullptr}},
{"gpu[api=angle_d3d9_es2,samples=1]", {"abc", "nbc", "cbs"}},
#endif
- {"gpu[samples=1", {"a", nullptr, nullptr}}, // Missing bracket makes this is not extended
- // form but via still works as expected.
- {"angle_gl_es2[samples=1]", {"abc", "def", nullptr}} // This is not extended form.
- // angle_gl_es2 is an api type not a
- // backend.
+ {"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.
+ // angle_gl_es2 is an api type not a
+ // backend.
};
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));