diff options
author | Mike Klein <mtklein@google.com> | 2018-07-10 18:25:03 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-10 20:13:26 +0000 |
commit | b82edcc92bb49ca877bd51b9f47cfece68785035 (patch) | |
tree | 26fe067de6cf37a96a93cb94bc18cd41bc7b880b /src/opts/SkRasterPipeline_opts.h | |
parent | 6eb36214461794626291a01c3150f7239e4a91a3 (diff) |
update (non-sprite) image shader color management
Just another little step... diffs down to ~450 from ~500.
The A8 handling has changed a little, keeping the paint
color in sRGB just to make the append_misc() logic a bit
more streamlined.
I may want to refactor things a little later so that I can
get an easy signal to use to_srgb and from_srgb stages instead
of sending them through the generic parametric stages.
Change-Id: Iefff3206b06a3aa7d81f85fd169272b6ac9c20e0
Reviewed-on: https://skia-review.googlesource.com/140250
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/opts/SkRasterPipeline_opts.h')
-rw-r--r-- | src/opts/SkRasterPipeline_opts.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h index 2431ad78f9..23b5e22829 100644 --- a/src/opts/SkRasterPipeline_opts.h +++ b/src/opts/SkRasterPipeline_opts.h @@ -1803,6 +1803,14 @@ STAGE(matrix_2x3, const float* m) { r = R; g = G; } +STAGE(matrix_3x3, const float* m) { + auto R = mad(r,m[0], mad(g,m[3], b*m[6])), + G = mad(r,m[1], mad(g,m[4], b*m[7])), + B = mad(r,m[2], mad(g,m[5], b*m[8])); + r = R; + g = G; + b = B; +} STAGE(matrix_3x4, const float* m) { auto R = mad(r,m[0], mad(g,m[3], mad(b,m[6], m[ 9]))), G = mad(r,m[1], mad(g,m[4], mad(b,m[7], m[10]))), @@ -3204,7 +3212,7 @@ static NotImplemented store_u16_be, byte_tables, colorburn, colordodge, softlight, hue, saturation, color, luminosity, - matrix_3x4, matrix_4x5, matrix_4x3, + matrix_3x3, matrix_3x4, matrix_4x5, matrix_4x3, parametric_r, parametric_g, parametric_b, parametric_a, gamma, gamma_dst, rgb_to_hsl, hsl_to_rgb, |