diff options
author | Mike Klein <mtklein@chromium.org> | 2018-05-10 11:29:15 -0400 |
---|---|---|
committer | Mike Klein <mtklein@chromium.org> | 2018-05-10 18:26:22 +0000 |
commit | ce4cf72e3487f661e53f6d0c3416c9b58da4fd00 (patch) | |
tree | 5e8a5b884c787a095ea25ea93070569731e937a1 /dm | |
parent | 024615e9752d93c842ad3cad597fd65382ddb678 (diff) |
non-linear blending first steps
Code:
- Add a non-linear blending bit and makeNonlinearBlending()
to SkColorSpace
- remove enough F16=linear checks to make it possible to
create surfaces and encode pngs with nonlinear F16
Testing:
- add "esrgb" software config to DM, run it
- add "srgbnl" software config, run it
- deemphasize importance of "srgb" config on bots
- update unit tests to reflect relaxed F16 constraints
- add a new unit test file with _really_ basic tests,
and a new unit test that's not working yet
Bug: skia:7942
Change-Id: I8ac042bdf9f3d791765393b68fd9256375184d83
Reviewed-on: https://skia-review.googlesource.com/127325
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -903,6 +903,7 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi if (FLAGS_cpu) { auto srgbColorSpace = SkColorSpace::MakeSRGB(); auto srgbLinearColorSpace = SkColorSpace::MakeSRGBLinear(); + auto esrgb = SkColorSpace::MakeSRGB()->makeNonlinearBlending(); SINK("g8", RasterSink, kGray_8_SkColorType); SINK("565", RasterSink, kRGB_565_SkColorType); @@ -915,6 +916,8 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi 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, esrgb); + SINK("srgbnl", RasterSink, kRGBA_8888_SkColorType, esrgb); SINK("t8888", ThreadedSink, kN32_SkColorType); SINK("pdf", PDFSink, false, SK_ScalarDefaultRasterDPI); SINK("skp", SKPSink); |