diff options
author | Mike Klein <mtklein@chromium.org> | 2016-12-14 13:38:24 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-14 13:38:41 +0000 |
commit | d37d5d96493604c12cfaa2d64bcbd32c41b01f3b (patch) | |
tree | 3de3ad9a4a08194c75314b07736170a7150fb5f2 /src/opts | |
parent | 65115a1b1a5c72b47492dc447d1d282353ae3121 (diff) |
Revert "Revert "clamp to premul when reading premul sRGB""
This reverts commit 2e018f548d76b0688f9873c683cffc681fec40ec.
Reason for revert: doesn't appear to have been the roll problem.
Original change's description:
> Revert "clamp to premul when reading premul sRGB"
>
> This reverts commit 04e10da8362a0dcabd795a4ad53f617719ca0d20.
>
> Reason for revert: roll?
>
> Change-Id: Id0a8dcd62763bd6eddde120c513ca97e098a4268
> Reviewed-on: https://skia-review.googlesource.com/6022
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I399ca5e728ce6766c6707682c4c6b685681ffdeb
Reviewed-on: https://skia-review.googlesource.com/6025
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/opts')
-rw-r--r-- | src/opts/SkRasterPipeline_opts.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h index 3cc3f2f01a..135d927b85 100644 --- a/src/opts/SkRasterPipeline_opts.h +++ b/src/opts/SkRasterPipeline_opts.h @@ -301,17 +301,23 @@ STAGE(clamp_0) { g = SkNf::Max(g, 0.0f); b = SkNf::Max(b, 0.0f); } +STAGE(clamp_1) { + a = SkNf::Min(a, 1.0f); + r = SkNf::Min(r, 1.0f); + g = SkNf::Min(g, 1.0f); + b = SkNf::Min(b, 1.0f); +} STAGE(clamp_a) { a = SkNf::Min(a, 1.0f); r = SkNf::Min(r, a); g = SkNf::Min(g, a); b = SkNf::Min(b, a); } -STAGE(clamp_1) { - a = SkNf::Min(a, 1.0f); - r = SkNf::Min(r, 1.0f); - g = SkNf::Min(g, 1.0f); - b = SkNf::Min(b, 1.0f); +STAGE(clamp_a_d) { + da = SkNf::Min(da, 1.0f); + dr = SkNf::Min(dr, da); + dg = SkNf::Min(dg, da); + db = SkNf::Min(db, da); } STAGE(unpremul) { |