aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-03-02 08:53:46 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-02 14:28:29 +0000
commitd222830941afae55a687f784480c080f364a8377 (patch)
tree460fcba04721222494bd0ac55ab47572ca46acef /dm/DM.cpp
parent39b101b13da171a0ba08ae7196d1a88bc8375ef7 (diff)
Test sRGB with non-linear blending using new "srgbnl" sink
BUG=skia: Change-Id: Ief7516c1505f8e447f83121ed4ba75b9fa9ba75b Reviewed-on: https://skia-review.googlesource.com/8976 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 5e3185bb30..bec5dd3ddc 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -866,19 +866,24 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi
if (FLAGS_cpu) {
auto srgbColorSpace = SkColorSpace::MakeSRGB();
+ auto srgbColorSpaceNonLinearBlending = SkColorSpace::MakeRGB(
+ SkColorSpace::kSRGB_RenderTargetGamma,
+ SkColorSpace::kSRGB_Gamut,
+ SkColorSpace::kNonLinearBlending_ColorSpaceFlag);
auto srgbLinearColorSpace = SkColorSpace::MakeSRGBLinear();
- SINK("565", RasterSink, kRGB_565_SkColorType);
- SINK("8888", RasterSink, kN32_SkColorType);
- SINK("srgb", RasterSink, kN32_SkColorType, srgbColorSpace);
- SINK("f16", RasterSink, kRGBA_F16_SkColorType, srgbLinearColorSpace);
- SINK("pdf", PDFSink);
- SINK("skp", SKPSink);
- SINK("pipe", PipeSink);
- SINK("svg", SVGSink);
- SINK("null", NullSink);
- SINK("xps", XPSSink);
- SINK("pdfa", PDFSink, true);
+ SINK("565", RasterSink, kRGB_565_SkColorType);
+ SINK("8888", RasterSink, kN32_SkColorType);
+ SINK("srgb", RasterSink, kN32_SkColorType, srgbColorSpace);
+ SINK("srgbnl", RasterSink, kN32_SkColorType, srgbColorSpaceNonLinearBlending);
+ SINK("f16", RasterSink, kRGBA_F16_SkColorType, srgbLinearColorSpace);
+ SINK("pdf", PDFSink);
+ SINK("skp", SKPSink);
+ SINK("pipe", PipeSink);
+ SINK("svg", SVGSink);
+ SINK("null", NullSink);
+ SINK("xps", XPSSink);
+ SINK("pdfa", PDFSink, true);
SINK("jsdebug", DebugSink);
}
#undef SINK