diff options
author | Matt Sarett <msarett@google.com> | 2017-04-12 16:26:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-15 12:15:36 +0000 |
commit | e22a6a29e2e5664ee907f1abccf615a900cbcfad (patch) | |
tree | bf37c1fae8bfed7be2f5703d672d0b5205c80140 /include/effects | |
parent | da3e596015f78645972c2cd2f562871dbb434418 (diff) |
SkPictureImageFilter::onMakeColorSpace()
Improves gm/recordopts.
Does not break gm/pictureimagefilter or gm/fastfilterbounds.
Bug: skia:
Change-Id: I67c8f02a9548bf751350dfa3c7029dd59b8a2d1d
Reviewed-on: https://skia-review.googlesource.com/13276
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include/effects')
-rw-r--r-- | include/effects/SkPictureImageFilter.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h index 2782532ad0..13bf66aac7 100644 --- a/include/effects/SkPictureImageFilter.h +++ b/include/effects/SkPictureImageFilter.h @@ -53,11 +53,12 @@ protected: void flatten(SkWriteBuffer&) const override; sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, SkIPoint* offset) const override; + sk_sp<SkImageFilter> onMakeColorSpace(SkColorSpaceXformer*) const override; private: explicit SkPictureImageFilter(sk_sp<SkPicture> picture); SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRect& cropRect, - PictureResolution, SkFilterQuality); + PictureResolution, SkFilterQuality, sk_sp<SkColorSpace>); void drawPictureAtDeviceResolution(SkCanvas* canvas, const SkIRect& deviceBounds, @@ -72,6 +73,10 @@ private: PictureResolution fPictureResolution; SkFilterQuality fFilterQuality; + // Should never be set by a public constructor. This is only used when onMakeColorSpace() + // forces a deferred color space xform. + sk_sp<SkColorSpace> fColorSpace; + typedef SkImageFilter INHERITED; }; |