From 0e4041f5c962dd16c4a69cbd9ff35685e9519ff3 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 19 Jun 2018 16:00:40 -0400 Subject: update software DM/nanobench configs for color testing - Rename 'srgbnl' to just 'srgb'. - Add 'narrow' and 'enarrow' for testing a gamut narrower than sRGB. Tested by running xfermodes2 in DM... all look different, what a mess. I also ran a few nanobenches and they seemed somewhat sane. Change-Id: Iacdc391dc0eef4153a76f5b4f78d72c57a4371ee Reviewed-on: https://skia-review.googlesource.com/135871 Commit-Queue: Mike Klein Auto-Submit: Mike Klein Reviewed-by: Brian Osman --- dm/DM.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'dm') diff --git a/dm/DM.cpp b/dm/DM.cpp index 34ffa541ca..32eba97c58 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -891,9 +891,6 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi #define SINK(t, sink, ...) if (config->getBackend().equals(t)) { return new sink(__VA_ARGS__); } if (FLAGS_cpu) { - auto srgbColorSpace = SkColorSpace::MakeSRGB(); - auto srgbLinearColorSpace = SkColorSpace::MakeSRGBLinear(); - SINK("g8", RasterSink, kGray_8_SkColorType); SINK("565", RasterSink, kRGB_565_SkColorType); SINK("4444", RasterSink, kARGB_4444_SkColorType); @@ -903,9 +900,6 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi SINK("rgbx", RasterSink, kRGB_888x_SkColorType); SINK("1010102", RasterSink, kRGBA_1010102_SkColorType); SINK("101010x", RasterSink, kRGB_101010x_SkColorType); - SINK("f16", RasterSink, kRGBA_F16_SkColorType, srgbLinearColorSpace); - SINK("esrgb", RasterSink, kRGBA_F16_SkColorType, srgbColorSpace); - SINK("srgbnl", RasterSink, kRGBA_8888_SkColorType, srgbColorSpace); SINK("t8888", ThreadedSink, kN32_SkColorType); SINK("pdf", PDFSink, false, SK_ScalarDefaultRasterDPI); SINK("skp", SKPSink); @@ -916,6 +910,22 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi SINK("pdfa", PDFSink, true, SK_ScalarDefaultRasterDPI); SINK("pdf300", PDFSink, false, 300); SINK("jsdebug", DebugSink); + + // Configs relevant to color management testing (and 8888 for reference). + + // 'narrow' has a gamut narrower than sRGB, and different transfer function. + SkMatrix44 narrow_gamut(SkMatrix44::kUninitialized_Constructor); + narrow_gamut.set3x3RowMajorf(gNarrow_toXYZD50); + + auto narrow = SkColorSpace::MakeRGB(k2Dot2Curve_SkGammaNamed, narrow_gamut), + srgb = SkColorSpace::MakeSRGB(), + srgbLinear = SkColorSpace::MakeSRGBLinear(); + + SINK( "f16", RasterSink, kRGBA_F16_SkColorType, srgbLinear); + SINK( "srgb", RasterSink, kRGBA_8888_SkColorType, srgb ); + SINK( "esrgb", RasterSink, kRGBA_F16_SkColorType, srgb ); + SINK( "narrow", RasterSink, kRGBA_8888_SkColorType, narrow ); + SINK("enarrow", RasterSink, kRGBA_F16_SkColorType, narrow ); } #undef SINK return nullptr; -- cgit v1.2.3