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/pdf | |
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/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 2d2e27bf1f..6868aefe5c 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -2342,9 +2342,9 @@ void SkPDFDevice::drawSpecial(SkSpecialImage* srcImg, int x, int y, const SkPain const SkIRect clipBounds = this->cs().bounds(this->bounds()).roundOut().makeOffset(-x, -y); sk_sp<SkImageFilterCache> cache(this->getImageFilterCache()); - // TODO: Should PDF be operating in a specified color space? For now, run the filter + // TODO: Should PDF be operating in a specified color type/space? For now, run the filter // in the same color space as the source (this is different from all other backends). - SkImageFilter::OutputProperties outputProperties(srcImg->getColorSpace()); + SkImageFilter::OutputProperties outputProperties(kN32_SkColorType, srcImg->getColorSpace()); SkImageFilter::Context ctx(matrix, clipBounds, cache.get(), outputProperties); sk_sp<SkSpecialImage> resultImg(filter->filterImage(srcImg, ctx, &offset)); |