diff options
author | Matt Sarett <msarett@google.com> | 2017-04-17 11:57:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-17 17:17:32 +0000 |
commit | 62745a8bba20d7ca91167915eb459339bcfb8862 (patch) | |
tree | 1765b63e0e3b8a73e154f4d866a5284ca475b314 /src/core/SkMatrixImageFilter.cpp | |
parent | 1c9c13a4c1b8d52afc8974e58f60e9f4f27f1965 (diff) |
Finish overriding onMakeColorSpace() for SkImageFilters
Fixes 3 gms in gbr-8888. Breaks 0 gms in gbr-8888.
Bug: skia:
Change-Id: I3365390b16353821ef6057a7bb68020887e36f72
Reviewed-on: https://skia-review.googlesource.com/13323
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkMatrixImageFilter.cpp')
-rw-r--r-- | src/core/SkMatrixImageFilter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/SkMatrixImageFilter.cpp b/src/core/SkMatrixImageFilter.cpp index 0a33280414..4d9ea215e4 100644 --- a/src/core/SkMatrixImageFilter.cpp +++ b/src/core/SkMatrixImageFilter.cpp @@ -95,6 +95,16 @@ sk_sp<SkSpecialImage> SkMatrixImageFilter::onFilterImage(SkSpecialImage* source, return surf->makeImageSnapshot(); } +sk_sp<SkImageFilter> SkMatrixImageFilter::onMakeColorSpace(SkColorSpaceXformer* xformer) const { + SkASSERT(1 == this->countInputs()); + if (!this->getInput(0)) { + return sk_ref_sp(const_cast<SkMatrixImageFilter*>(this)); + } + + sk_sp<SkImageFilter> input = this->getInput(0)->makeColorSpace(xformer); + return SkMatrixImageFilter::Make(fTransform, fFilterQuality, std::move(input)); +} + SkRect SkMatrixImageFilter::computeFastBounds(const SkRect& src) const { SkRect bounds = this->getInput(0) ? this->getInput(0)->computeFastBounds(src) : src; SkRect dst; |