diff options
author | Mike Klein <mtklein@chromium.org> | 2018-05-30 11:33:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-30 17:09:08 +0000 |
commit | 588f879677d4f36e16a42dd96876534f104c2e2f (patch) | |
tree | bdca8a096ff6b997e255924187adee17b538f0e0 /src/core/SkConvertPixels.cpp | |
parent | 35fe3ab56994b92e40cd2604e0d897da7dfb0b53 (diff) |
warmup, remove clamping in append_gamut_transform()
Clamping here seems inconsistent with our color pipeline model,
and with the existing GPU impl. The SkRasterPipeline store
stages already do clamp when storing unorms, and table-lookup
stages clamp their inputs, so it should be safe.
While refactoring, slim its interface down a bit.
Change-Id: I4772457fdf90e483834d034f02974d7a859cbe24
Reviewed-on: https://skia-review.googlesource.com/130902
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkConvertPixels.cpp')
-rw-r--r-- | src/core/SkConvertPixels.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkConvertPixels.cpp b/src/core/SkConvertPixels.cpp index 1eafe8a492..ddc04c06b6 100644 --- a/src/core/SkConvertPixels.cpp +++ b/src/core/SkConvertPixels.cpp @@ -302,10 +302,10 @@ static void convert_with_pipeline(const SkImageInfo& dstInfo, void* dstRow, size } } - float matrix[12]; + SkSTArenaAlloc<12*sizeof(float)> alloc; if (isColorAware) { - append_gamut_transform(&pipeline, matrix, srcInfo.colorSpace(), dstInfo.colorSpace(), - premulState); + append_gamut_transform(&pipeline, &alloc, + srcInfo.colorSpace(), dstInfo.colorSpace(), premulState); } SkAlphaType dat = dstInfo.alphaType(); |