aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPixmap.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-12-21 14:53:13 +0000
committerGravatar Mike Klein <mtklein@chromium.org>2017-12-21 14:55:43 +0000
commit6685555efc64c55156fa76a95add4a0945a1d223 (patch)
tree745f31e576f048ea142b00bb3f3349e532422972 /src/core/SkPixmap.cpp
parent9838b49b2e756f16ed9d53cab825bf6530d7594b (diff)
Revert "remove bicubic clamp in SkImageShader"
This reverts commit bc9f3499c345ce59f8cd3889c580fa75db54034b. Reason for revert: gotta be the reason for layout test issues. Original change's description: > remove bicubic clamp in SkImageShader > > We ought to be able to handle out-of-gamut colors now, whatever > their provenance. Should be we can just not clamp here. > > Bug: skia:5733 > > Change-Id: Icd9851543638fd81755afee2eac2347702b88e9f > Reviewed-on: https://skia-review.googlesource.com/87000 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:5733 Change-Id: I3bccf494479b845210ee2a6824dcc32b89a93312 Reviewed-on: https://skia-review.googlesource.com/88423 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkPixmap.cpp')
-rw-r--r--src/core/SkPixmap.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp
index 7873a9b8ce..5648405445 100644
--- a/src/core/SkPixmap.cpp
+++ b/src/core/SkPixmap.cpp
@@ -251,6 +251,10 @@ bool SkPixmap::scalePixels(const SkPixmap& dst, SkFilterQuality quality) const {
// Trick: if src and dst are both unpremul, we can give the correct result if we change both
// to premul (or opaque), since the draw will not try to blend or otherwise interpret
// the pixels' alpha.
+ //
+ // Today this works except in kHigh_SkFilterQuality, where we incorrectly clamp assuming the
+ // colors are premul. TODO: fix the HQ mode.
+ //
if (srcPtr->alphaType() == kUnpremul_SkAlphaType &&
dstPtr->alphaType() == kUnpremul_SkAlphaType)
{