diff options
author | Matt Sarett <msarett@google.com> | 2017-04-10 16:35:33 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-10 21:28:43 +0000 |
commit | 6d72ed918d8763e65899183c2d12b06958c791f4 (patch) | |
tree | 0ae05fc489d85aed6f0f928680533fc7d15e1540 /src/effects/SkMatrixConvolutionImageFilter.cpp | |
parent | 67cadde35b9fceef49c332ce892d025c576b5983 (diff) |
SkImageFilter::onMakeColorSpace() - more overrides
Fills out most of the simple implementations.
Improves 22 gms in gbr-8888.
Bug: skia:
Change-Id: I881ade140993568263de75be51aed240d2de8cc6
Reviewed-on: https://skia-review.googlesource.com/13126
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/effects/SkMatrixConvolutionImageFilter.cpp')
-rw-r--r-- | src/effects/SkMatrixConvolutionImageFilter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp index 5c5ddc66d2..092cb661bd 100644 --- a/src/effects/SkMatrixConvolutionImageFilter.cpp +++ b/src/effects/SkMatrixConvolutionImageFilter.cpp @@ -388,6 +388,19 @@ sk_sp<SkSpecialImage> SkMatrixConvolutionImageFilter::onFilterImage(SkSpecialIma dst); } +sk_sp<SkImageFilter> SkMatrixConvolutionImageFilter::onMakeColorSpace(SkColorSpaceXformer* xformer) +const { + SkASSERT(1 == this->countInputs()); + if (!this->getInput(0)) { + return sk_ref_sp(const_cast<SkMatrixConvolutionImageFilter*>(this)); + } + + sk_sp<SkImageFilter> input = this->getInput(0)->makeColorSpace(xformer); + return SkMatrixConvolutionImageFilter::Make(fKernelSize, fKernel, fGain, fBias, fKernelOffset, + fTileMode, fConvolveAlpha, std::move(input), + this->getCropRectIfSet()); +} + SkIRect SkMatrixConvolutionImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, MapDirection direction) const { SkIRect dst = src; |