Create a separate src for colorspace tests

This will allow me to run these tests in sRGB mode, while
leaving most of the image tests disabled.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206953006

Review-Url: https://codereview.chromium.org/2206953006
This commit is contained in:
msarett 2016-08-04 12:22:06 -07:00 committed by Commit bot
parent 3f5a47599b
commit b8d1aac87a
19 changed files with 27 additions and 7 deletions

View File

@ -763,22 +763,22 @@ static bool gather_srcs() {
for (auto colorImage : colorImages) {
ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBaseline_Mode,
kN32_SkColorType);
push_src("image", "color_codec_baseline", src);
push_src("colorImage", "color_codec_baseline", src);
src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode, kN32_SkColorType);
push_src("image", "color_codec_HPZR30w", src);
push_src("colorImage", "color_codec_HPZR30w", src);
// TODO (msarett):
// Should we test this Dst in F16 mode (even though the Dst gamma is 2.2 instead of sRGB)?
src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kN32_SkColorType);
push_src("image", "color_codec_sRGB_kN32", src);
push_src("colorImage", "color_codec_sRGB_kN32", src);
src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kRGBA_F16_SkColorType);
push_src("image", "color_codec_sRGB_kF16", src);
push_src("colorImage", "color_codec_sRGB_kF16", src);
#if defined(SK_TEST_QCMS)
src = new ColorCodecSrc(colorImage, ColorCodecSrc::kQCMS_HPZR30w_Mode,
kRGBA_8888_SkColorType);
push_src("image", "color_codec_QCMS_HPZR30w", src);
push_src("colorImage", "color_codec_QCMS_HPZR30w", src);
#endif
}

View File

@ -315,7 +315,7 @@ def dm_flags(bot):
args.extend(configs)
# Run tests, gms, and image decoding tests everywhere.
args.extend('--src tests gm image'.split(' '))
args.extend('--src tests gm image colorImage'.split(' '))
if 'GalaxyS' in bot:
args.extend(('--threads', '0'))

View File

@ -426,6 +426,7 @@
"tests",
"gm",
"image",
"colorImage",
"--threads",
"0",
"--blacklist",

View File

@ -525,6 +525,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -161,6 +161,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -97,6 +97,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -215,6 +215,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -101,6 +101,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",
@ -467,6 +468,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",
@ -834,6 +836,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -214,6 +214,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -491,6 +491,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -521,6 +521,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -214,6 +214,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -629,6 +629,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -629,6 +629,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -215,6 +215,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -527,6 +527,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -633,6 +633,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -633,6 +633,7 @@
"tests",
"gm",
"image",
"colorImage",
"--blacklist",
"f16",
"_",

View File

@ -356,7 +356,9 @@ bool SkColorSpace::Equals(const SkColorSpace* src, const SkColorSpace* dst) {
return (src->fGammaNamed == dst->fGammaNamed) && (src->fToXYZD50 == dst->fToXYZD50);
default:
// If |src| does not have a named gamma, fProfileData should be non-null.
SkASSERT(false);
// FIXME (msarett): We may hit this case on pngs that specify float gammas.
// Gamma can be non-standard, but we don't have a profile
// to fall back on. What do we do?
return false;
}
}