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

Unified Diff: tests/TestConfigParsing.cpp

Issue 1853103003: Add predfined configs for msaa4, nvpr4, nvpr4dit, and srgb that explictly use OpenGL rather than 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 | « no previous file | tools/dm_flags.json » ('j') | tools/dm_flags.json » ('J')
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..93427b91cd43b7409ee8170de2986f7c06159a84 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -58,10 +58,16 @@ DEF_TEST(ParseConfigs_OutParam, reporter) {
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu"));
+
SkCommandLineFlags::StringArray config2 = make_string_array({"8888"});
ParseConfigs(config2, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
REPORTER_ASSERT(reporter, configs[0]->getTag().equals("8888"));
+
+ SkCommandLineFlags::StringArray config3 = make_string_array({"gl"});
+ ParseConfigs(config3, &configs);
+ REPORTER_ASSERT(reporter, configs.count() == 1);
+ REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gl"));
}
DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
@@ -71,7 +77,7 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
"565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16", "msaa4",
"nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvprdit4", "pdf",
"pdf_poppler", "skp", "svg", "xps", "angle", "angle-gl", "commandbuffer", "mesa", "hwui",
- "gpuf16", "gpusrgb"
+ "gpuf16", "gpusrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4"
});
SkCommandLineConfigArray configs;
@@ -142,6 +148,21 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
#else
REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu());
#endif
+ REPORTER_ASSERT(reporter, configs[28]->asConfigGpu());
+ 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[30]->asConfigGpu());
egdaniel 2016/04/04 19:09:19 currently in ToT there is a bug with the current i
+ REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getSamples() == 4);
+ REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getUseNVPR());
+ REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, configs[31]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getColorType()
+ == kN32_SkColorType);
+ REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getProfileType()
+ == kSRGB_SkColorProfileType);
+ REPORTER_ASSERT(reporter, configs[32]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[32]->asConfigGpu()->getSamples() == 4);
#endif
}
@@ -153,7 +174,8 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
"gpu(api=mesa,samples=77)",
"gpu(dit=true,api=commandbuffer)",
"gpu()",
- "gpu(api=gles)"
+ "gpu(api=gles)",
+ "gpu(api=gl)"
});
SkCommandLineConfigArray configs;
@@ -204,6 +226,11 @@ DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
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);
#endif
}
« no previous file with comments | « no previous file | tools/dm_flags.json » ('j') | tools/dm_flags.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698