aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TestConfigParsing.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-10-17 11:14:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-17 17:54:42 +0000
commit4a6b28ef76fb2c8982cd70baebaffe4c63a32bbe (patch)
tree7577dc17d86801bade1c641dd79a8aa3e56dc9a2 /tests/TestConfigParsing.cpp
parentaf017418b369fd14cb009c5f4c82683fb59f6c87 (diff)
Add "Narrow" RGB gamut to DM
This is an artificially small color space, for testing rendering with values that fall outside of [0,1]. All of the saturated sRGB colors used in our tests will end up landing outside of [0,1] in this space, so we can verify that nothing that crashes, or produces wildly incorrect results. Of course, many GMs *do* produce wildly incorrect results, but I need to catalog all of those and start figuring out why. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3532 Change-Id: Idb44ee6250f2d7198e634755cd2b1f3bc8f15412 Reviewed-on: https://skia-review.googlesource.com/3532 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r--tests/TestConfigParsing.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index 4d7e5cad0e..412be73626 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -79,7 +79,8 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
"nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvprdit4", "pdf", "skp",
"svg", "xps", "angle_d3d11_es2", "angle_gl_es2", "commandbuffer", "mesa", "hwui", "gpuf16",
"gpusrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk", "glinst", "glinst4",
- "glinstdit4", "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit4", "glwide"
+ "glinstdit4", "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit4", "glwide",
+ "glnarrow"
});
SkCommandLineConfigArray configs;
@@ -134,6 +135,11 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
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[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() !=
+ as_CSB(srgbColorSpace)->toXYZD50());
REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced());