diff options
author | Brian Osman <brianosman@google.com> | 2018-07-06 13:57:01 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-06 18:34:58 +0000 |
commit | a50205fca5f7cff36dd3adac841b4c23a90a0b7d (patch) | |
tree | 4aa111a0c4b80400dfa39ef5b36e8ef391c164ab /src/core/SkBitmapDevice.cpp | |
parent | 5a619a740f12f0b1f504f305b8964efe4c85ee26 (diff) |
Add color type to the image filter DAG's OutputProperties
Don't try to guess the pixel config to use for intermediates. Instead,
just make the intermediates in the same color type (and space) as the
final destination. This removes some no-longer-correct logic that was
using sRGB configs, resulting in linear blending and precision loss.
Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0
Reviewed-on: https://skia-review.googlesource.com/139547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 0d1ec8ddc5..08c36d3980 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -643,7 +643,7 @@ void SkBitmapDevice::drawSpecial(SkSpecialImage* src, int x, int y, const SkPain SkMatrix::MakeTrans(SkIntToScalar(-x), SkIntToScalar(-y)), this->ctm()); const SkIRect clipBounds = fRCStack.rc().getBounds().makeOffset(-x, -y); sk_sp<SkImageFilterCache> cache(this->getImageFilterCache()); - SkImageFilter::OutputProperties outputProperties(fBitmap.colorSpace()); + SkImageFilter::OutputProperties outputProperties(fBitmap.colorType(), fBitmap.colorSpace()); SkImageFilter::Context ctx(matrix, clipBounds, cache.get(), outputProperties); filteredImage = filter->filterImage(src, ctx, &offset); |