diff options
author | robertphillips <robertphillips@google.com> | 2016-04-17 14:27:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-17 14:27:05 -0700 |
commit | 225db4441e0cb887d52c906e8bb39df506304b3e (patch) | |
tree | d76da5559730f212ec2fbf4912d68875a0515a2f | |
parent | 6fb3cd7209849e665635ac17ef4eef4ad63e7f61 (diff) |
Outline SkImageFilter Make methods
Mainly mechanical CL.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893973002
Review URL: https://codereview.chromium.org/1893973002
22 files changed, 170 insertions, 111 deletions
diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index 607e76de51..9bfa19b875 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -13,13 +13,9 @@ class SK_API SkBlurImageFilter : public SkImageFilter { public: - static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY, sk_sp<SkImageFilter> input, - const CropRect* cropRect = nullptr) { - if (0 == sigmaX && 0 == sigmaY && nullptr == cropRect) { - return input; - } - return sk_sp<SkImageFilter>(new SkBlurImageFilter(sigmaX, sigmaY, input, cropRect)); - } + static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY, + sk_sp<SkImageFilter> input, + const CropRect* cropRect = nullptr); SkRect computeFastBounds(const SkRect&) const override; diff --git a/include/effects/SkComposeImageFilter.h b/include/effects/SkComposeImageFilter.h index 49c7685415..fe0814af23 100644 --- a/include/effects/SkComposeImageFilter.h +++ b/include/effects/SkComposeImageFilter.h @@ -12,16 +12,8 @@ class SK_API SkComposeImageFilter : public SkImageFilter { public: - static sk_sp<SkImageFilter> Make(sk_sp<SkImageFilter> outer, sk_sp<SkImageFilter> inner) { - if (!outer) { - return inner; - } - if (!inner) { - return outer; - } - sk_sp<SkImageFilter> inputs[2] = { std::move(outer), std::move(inner) }; - return sk_sp<SkImageFilter>(new SkComposeImageFilter(inputs)); - } + static sk_sp<SkImageFilter> Make(sk_sp<SkImageFilter> outer, sk_sp<SkImageFilter> inner); + SkRect computeFastBounds(const SkRect& src) const override; SK_TO_STRING_OVERRIDE() diff --git a/include/effects/SkDropShadowImageFilter.h b/include/effects/SkDropShadowImageFilter.h index a4726f3247..87e7406829 100644 --- a/include/effects/SkDropShadowImageFilter.h +++ b/include/effects/SkDropShadowImageFilter.h @@ -26,12 +26,7 @@ public: static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, ShadowMode shadowMode, sk_sp<SkImageFilter> input, - const CropRect* cropRect = nullptr) { - return sk_sp<SkImageFilter>(new SkDropShadowImageFilter(dx, dy, sigmaX, sigmaY, - color, shadowMode, - std::move(input), - cropRect)); - } + const CropRect* cropRect = nullptr); SkRect computeFastBounds(const SkRect&) const override; SK_TO_STRING_OVERRIDE() diff --git a/include/effects/SkImageSource.h b/include/effects/SkImageSource.h index 0b4fecd776..4ceff95668 100644 --- a/include/effects/SkImageSource.h +++ b/include/effects/SkImageSource.h @@ -13,25 +13,11 @@ class SK_API SkImageSource : public SkImageFilter { public: - static sk_sp<SkImageFilter> Make(sk_sp<SkImage> image) { - if (!image) { - return nullptr; - } - - return sk_sp<SkImageFilter>(new SkImageSource(std::move(image))); - } + static sk_sp<SkImageFilter> Make(sk_sp<SkImage> image); static sk_sp<SkImageFilter> Make(sk_sp<SkImage> image, const SkRect& srcRect, const SkRect& dstRect, - SkFilterQuality filterQuality) { - if (!image) { - return nullptr; - } - - return sk_sp<SkImageFilter>(new SkImageSource(std::move(image), - srcRect, dstRect, - filterQuality)); - } + SkFilterQuality filterQuality); SkRect computeFastBounds(const SkRect& src) const override; diff --git a/include/effects/SkMergeImageFilter.h b/include/effects/SkMergeImageFilter.h index e85cc1f97f..3bab08b2a1 100644 --- a/include/effects/SkMergeImageFilter.h +++ b/include/effects/SkMergeImageFilter.h @@ -18,18 +18,11 @@ public: static sk_sp<SkImageFilter> Make(sk_sp<SkImageFilter> first, sk_sp<SkImageFilter> second, SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode, - const CropRect* cropRect = nullptr) { - sk_sp<SkImageFilter> inputs[2] = { first, second }; - SkXfermode::Mode modes[2] = { mode, mode }; - return sk_sp<SkImageFilter>(new SkMergeImageFilter(inputs, 2, modes, cropRect)); - } - + const CropRect* cropRect = nullptr); static sk_sp<SkImageFilter> Make(sk_sp<SkImageFilter> filters[], int count, const SkXfermode::Mode modes[] = nullptr, - const CropRect* cropRect = nullptr) { - return sk_sp<SkImageFilter>(new SkMergeImageFilter(filters, count, modes, cropRect)); - } + const CropRect* cropRect = nullptr); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter) diff --git a/include/effects/SkMorphologyImageFilter.h b/include/effects/SkMorphologyImageFilter.h index 27608ecd07..fbbbe207ab 100644 --- a/include/effects/SkMorphologyImageFilter.h +++ b/include/effects/SkMorphologyImageFilter.h @@ -57,14 +57,7 @@ class SK_API SkDilateImageFilter : public SkMorphologyImageFilter { public: static sk_sp<SkImageFilter> Make(int radiusX, int radiusY, sk_sp<SkImageFilter> input, - const CropRect* cropRect = nullptr) { - if (radiusX < 0 || radiusY < 0) { - return nullptr; - } - return sk_sp<SkImageFilter>(new SkDilateImageFilter(radiusX, radiusY, - std::move(input), - cropRect)); - } + const CropRect* cropRect = nullptr); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) @@ -96,14 +89,7 @@ class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { public: static sk_sp<SkImageFilter> Make(int radiusX, int radiusY, sk_sp<SkImageFilter> input, - const CropRect* cropRect = nullptr) { - if (radiusX < 0 || radiusY < 0) { - return nullptr; - } - return sk_sp<SkImageFilter>(new SkErodeImageFilter(radiusX, radiusY, - std::move(input), - cropRect)); - } + const CropRect* cropRect = nullptr); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) diff --git a/include/effects/SkOffsetImageFilter.h b/include/effects/SkOffsetImageFilter.h index cf2ff96ada..c1005ef780 100644 --- a/include/effects/SkOffsetImageFilter.h +++ b/include/effects/SkOffsetImageFilter.h @@ -15,13 +15,7 @@ class SK_API SkOffsetImageFilter : public SkImageFilter { public: static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, sk_sp<SkImageFilter> input, - const CropRect* cropRect = nullptr) { - if (!SkScalarIsFinite(dx) || !SkScalarIsFinite(dy)) { - return nullptr; - } - - return sk_sp<SkImageFilter>(new SkOffsetImageFilter(dx, dy, std::move(input), cropRect)); - } + const CropRect* cropRect = nullptr); SkRect computeFastBounds(const SkRect& src) const override; diff --git a/include/effects/SkPaintImageFilter.h b/include/effects/SkPaintImageFilter.h index 35a76b80fb..8a59da6c66 100644 --- a/include/effects/SkPaintImageFilter.h +++ b/include/effects/SkPaintImageFilter.h @@ -22,9 +22,7 @@ public: * not specified, the source primitive's bounds are used * instead. */ - static sk_sp<SkImageFilter> Make(const SkPaint& paint, const CropRect* cropRect = nullptr) { - return sk_sp<SkImageFilter>(new SkPaintImageFilter(paint, cropRect)); - } + static sk_sp<SkImageFilter> Make(const SkPaint& paint, const CropRect* cropRect = nullptr); bool affectsTransparentBlack() const override; diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h index c3f9435d61..2ca1c5b4fd 100644 --- a/include/effects/SkPictureImageFilter.h +++ b/include/effects/SkPictureImageFilter.h @@ -16,20 +16,13 @@ public: /** * Refs the passed-in picture. */ - static sk_sp<SkImageFilter> Make(sk_sp<SkPicture> picture) { - return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture))); - } + static sk_sp<SkImageFilter> Make(sk_sp<SkPicture> picture); /** * Refs the passed-in picture. cropRect can be used to crop or expand the destination rect when * the picture is drawn. (No scaling is implied by the dest rect; only the CTM is applied.) */ - static sk_sp<SkImageFilter> Make(sk_sp<SkPicture> picture, const SkRect& cropRect) { - return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture), - cropRect, - kDeviceSpace_PictureResolution, - kLow_SkFilterQuality)); - } + static sk_sp<SkImageFilter> Make(sk_sp<SkPicture> picture, const SkRect& cropRect); /** * Refs the passed-in picture. The picture is rasterized at a resolution that matches the @@ -40,12 +33,7 @@ public: */ static sk_sp<SkImageFilter> MakeForLocalSpace(sk_sp<SkPicture> picture, const SkRect& cropRect, - SkFilterQuality filterQuality) { - return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture), - cropRect, - kLocalSpace_PictureResolution, - filterQuality)); - } + SkFilterQuality filterQuality); #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR static SkImageFilter* Create(const SkPicture* picture) { diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h index 0f89759c1c..4aa30083dd 100644 --- a/include/effects/SkTestImageFilters.h +++ b/include/effects/SkTestImageFilters.h @@ -14,16 +14,7 @@ // Fun mode that scales down (only) and then scales back up to look pixelated class SK_API SkDownSampleImageFilter : public SkImageFilter { public: - static sk_sp<SkImageFilter> Make(SkScalar scale, sk_sp<SkImageFilter> input) { - if (!SkScalarIsFinite(scale)) { - return nullptr; - } - // we don't support scale in this range - if (scale > SK_Scalar1 || scale <= 0) { - return nullptr; - } - return sk_sp<SkImageFilter>(new SkDownSampleImageFilter(scale, std::move(input))); - } + static sk_sp<SkImageFilter> Make(SkScalar scale, sk_sp<SkImageFilter> input); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter) diff --git a/src/core/SkLocalMatrixImageFilter.cpp b/src/core/SkLocalMatrixImageFilter.cpp index 42acee0c22..b4d5bb2741 100644 --- a/src/core/SkLocalMatrixImageFilter.cpp +++ b/src/core/SkLocalMatrixImageFilter.cpp @@ -10,6 +10,20 @@ #include "SkSpecialImage.h" #include "SkString.h" +sk_sp<SkImageFilter> SkLocalMatrixImageFilter::Make(const SkMatrix& localM, + sk_sp<SkImageFilter> input) { + if (!input) { + return nullptr; + } + if (localM.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) { + return nullptr; + } + if (localM.isIdentity()) { + return input; + } + return sk_sp<SkImageFilter>(new SkLocalMatrixImageFilter(localM, input)); +} + SkLocalMatrixImageFilter::SkLocalMatrixImageFilter(const SkMatrix& localM, sk_sp<SkImageFilter> input) : INHERITED(&input, 1, nullptr) diff --git a/src/core/SkLocalMatrixImageFilter.h b/src/core/SkLocalMatrixImageFilter.h index eb112b0f0d..3ec50384b9 100644 --- a/src/core/SkLocalMatrixImageFilter.h +++ b/src/core/SkLocalMatrixImageFilter.h @@ -16,18 +16,7 @@ */ class SkLocalMatrixImageFilter : public SkImageFilter { public: - static sk_sp<SkImageFilter> Make(const SkMatrix& localM, sk_sp<SkImageFilter> input) { - if (!input) { - return nullptr; - } - if (localM.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) { - return nullptr; - } - if (localM.isIdentity()) { - return input; - } - return sk_sp<SkImageFilter>(new SkLocalMatrixImageFilter(localM, input)); - } + static sk_sp<SkImageFilter> Make(const SkMatrix& localM, sk_sp<SkImageFilter> input); SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLocalMatrixImageFilter) diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp index d387c2fda4..3ed88f1534 100644 --- a/src/effects/SkBlurImageFilter.cpp +++ b/src/effects/SkBlurImageFilter.cpp @@ -20,6 +20,15 @@ #include "SkGr.h" #endif +sk_sp<SkImageFilter> SkBlurImageFilter::Make(SkScalar sigmaX, SkScalar sigmaY, + sk_sp<SkImageFilter> input, + const CropRect* cropRect) { + if (0 == sigmaX && 0 == sigmaY && !cropRect) { + return input; + } + return sk_sp<SkImageFilter>(new SkBlurImageFilter(sigmaX, sigmaY, input, cropRect)); +} + // This rather arbitrary-looking value results in a maximum box blur kernel size // of 1000 pixels on the raster path, which matches the WebKit and Firefox // implementations. Since the GPU path does not compute a box blur, putting diff --git a/src/effects/SkComposeImageFilter.cpp b/src/effects/SkComposeImageFilter.cpp index e960f966c5..a54e53b67a 100644 --- a/src/effects/SkComposeImageFilter.cpp +++ b/src/effects/SkComposeImageFilter.cpp @@ -11,6 +11,17 @@ #include "SkSpecialImage.h" #include "SkWriteBuffer.h" +sk_sp<SkImageFilter> SkComposeImageFilter::Make(sk_sp<SkImageFilter> outer, + sk_sp<SkImageFilter> inner) { + if (!outer) { + return inner; + } + if (!inner) { + return outer; + } + sk_sp<SkImageFilter> inputs[2] = { std::move(outer), std::move(inner) }; + return sk_sp<SkImageFilter>(new SkComposeImageFilter(inputs)); +} SkRect SkComposeImageFilter::computeFastBounds(const SkRect& src) const { SkImageFilter* outer = this->getInput(0); diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp index 92e7e2c096..31c45082b2 100644 --- a/src/effects/SkDropShadowImageFilter.cpp +++ b/src/effects/SkDropShadowImageFilter.cpp @@ -14,6 +14,17 @@ #include "SkSpecialSurface.h" #include "SkWriteBuffer.h" +sk_sp<SkImageFilter> SkDropShadowImageFilter::Make(SkScalar dx, SkScalar dy, + SkScalar sigmaX, SkScalar sigmaY, + SkColor color, ShadowMode shadowMode, + sk_sp<SkImageFilter> input, + const CropRect* cropRect) { + return sk_sp<SkImageFilter>(new SkDropShadowImageFilter(dx, dy, sigmaX, sigmaY, + color, shadowMode, + std::move(input), + cropRect)); +} + SkDropShadowImageFilter::SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, ShadowMode shadowMode, sk_sp<SkImageFilter> input, diff --git a/src/effects/SkImageSource.cpp b/src/effects/SkImageSource.cpp index 223c2a7b4b..e00bced4c4 100644 --- a/src/effects/SkImageSource.cpp +++ b/src/effects/SkImageSource.cpp @@ -15,6 +15,26 @@ #include "SkWriteBuffer.h" #include "SkString.h" +sk_sp<SkImageFilter> SkImageSource::Make(sk_sp<SkImage> image) { + if (!image) { + return nullptr; + } + + return sk_sp<SkImageFilter>(new SkImageSource(std::move(image))); +} + +sk_sp<SkImageFilter> SkImageSource::Make(sk_sp<SkImage> image, + const SkRect& srcRect, + const SkRect& dstRect, + SkFilterQuality filterQuality) { + if (!image) { + return nullptr; + } + + return sk_sp<SkImageFilter>(new SkImageSource(std::move(image), + srcRect, dstRect, + filterQuality)); +} SkImageSource::SkImageSource(sk_sp<SkImage> image) : INHERITED(nullptr, 0, nullptr) diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp index 44e6caf087..2dd02ee529 100755 --- a/src/effects/SkMergeImageFilter.cpp +++ b/src/effects/SkMergeImageFilter.cpp @@ -14,6 +14,22 @@ #include "SkWriteBuffer.h" #include "SkValidationUtils.h" +sk_sp<SkImageFilter> SkMergeImageFilter::Make(sk_sp<SkImageFilter> first, + sk_sp<SkImageFilter> second, + SkXfermode::Mode mode, + const CropRect* cropRect) { + sk_sp<SkImageFilter> inputs[2] = { first, second }; + SkXfermode::Mode modes[2] = { mode, mode }; + return sk_sp<SkImageFilter>(new SkMergeImageFilter(inputs, 2, modes, cropRect)); +} + +sk_sp<SkImageFilter> SkMergeImageFilter::Make(sk_sp<SkImageFilter> filters[], + int count, + const SkXfermode::Mode modes[], + const CropRect* cropRect) { + return sk_sp<SkImageFilter>(new SkMergeImageFilter(filters, count, modes, cropRect)); +} + /////////////////////////////////////////////////////////////////////////////// void SkMergeImageFilter::initAllocModes() { diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index d0ca20576b..1f22a6e194 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -28,6 +28,29 @@ #include "glsl/GrGLSLUniformHandler.h" #endif +sk_sp<SkImageFilter> SkDilateImageFilter::Make(int radiusX, int radiusY, + sk_sp<SkImageFilter> input, + const CropRect* cropRect) { + if (radiusX < 0 || radiusY < 0) { + return nullptr; + } + return sk_sp<SkImageFilter>(new SkDilateImageFilter(radiusX, radiusY, + std::move(input), + cropRect)); +} + + +sk_sp<SkImageFilter> SkErodeImageFilter::Make(int radiusX, int radiusY, + sk_sp<SkImageFilter> input, + const CropRect* cropRect) { + if (radiusX < 0 || radiusY < 0) { + return nullptr; + } + return sk_sp<SkImageFilter>(new SkErodeImageFilter(radiusX, radiusY, + std::move(input), + cropRect)); +} + SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, int radiusY, sk_sp<SkImageFilter> input, diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp index 1df47d8b6f..af60164d99 100644 --- a/src/effects/SkOffsetImageFilter.cpp +++ b/src/effects/SkOffsetImageFilter.cpp @@ -15,6 +15,16 @@ #include "SkSpecialSurface.h" #include "SkWriteBuffer.h" +sk_sp<SkImageFilter> SkOffsetImageFilter::Make(SkScalar dx, SkScalar dy, + sk_sp<SkImageFilter> input, + const CropRect* cropRect) { + if (!SkScalarIsFinite(dx) || !SkScalarIsFinite(dy)) { + return nullptr; + } + + return sk_sp<SkImageFilter>(new SkOffsetImageFilter(dx, dy, std::move(input), cropRect)); +} + sk_sp<SkSpecialImage> SkOffsetImageFilter::onFilterImage(SkSpecialImage* source, const Context& ctx, SkIPoint* offset) const { diff --git a/src/effects/SkPaintImageFilter.cpp b/src/effects/SkPaintImageFilter.cpp index f561928684..8833629eed 100644 --- a/src/effects/SkPaintImageFilter.cpp +++ b/src/effects/SkPaintImageFilter.cpp @@ -12,6 +12,11 @@ #include "SkSpecialSurface.h" #include "SkWriteBuffer.h" +sk_sp<SkImageFilter> SkPaintImageFilter::Make(const SkPaint& paint, + const CropRect* cropRect) { + return sk_sp<SkImageFilter>(new SkPaintImageFilter(paint, cropRect)); +} + SkPaintImageFilter::SkPaintImageFilter(const SkPaint& paint, const CropRect* cropRect) : INHERITED(nullptr, 0, cropRect) , fPaint(paint) { diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp index 8e0115c345..db283c29e9 100644 --- a/src/effects/SkPictureImageFilter.cpp +++ b/src/effects/SkPictureImageFilter.cpp @@ -14,6 +14,27 @@ #include "SkWriteBuffer.h" #include "SkValidationUtils.h" +sk_sp<SkImageFilter> SkPictureImageFilter::Make(sk_sp<SkPicture> picture) { + return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture))); +} + +sk_sp<SkImageFilter> SkPictureImageFilter::Make(sk_sp<SkPicture> picture, + const SkRect& cropRect) { + return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture), + cropRect, + kDeviceSpace_PictureResolution, + kLow_SkFilterQuality)); +} + +sk_sp<SkImageFilter> SkPictureImageFilter::MakeForLocalSpace(sk_sp<SkPicture> picture, + const SkRect& cropRect, + SkFilterQuality filterQuality) { + return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture), + cropRect, + kLocalSpace_PictureResolution, + filterQuality)); +} + SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture) : INHERITED(nullptr, 0, nullptr) , fPicture(std::move(picture)) diff --git a/src/effects/SkTestImageFilters.cpp b/src/effects/SkTestImageFilters.cpp index 5cc890c848..208053b90e 100755 --- a/src/effects/SkTestImageFilters.cpp +++ b/src/effects/SkTestImageFilters.cpp @@ -14,6 +14,17 @@ /////////////////////////////////////////////////////////////////////////////// +sk_sp<SkImageFilter> SkDownSampleImageFilter::Make(SkScalar scale, sk_sp<SkImageFilter> input) { + if (!SkScalarIsFinite(scale)) { + return nullptr; + } + // we don't support scale in this range + if (scale > SK_Scalar1 || scale <= 0) { + return nullptr; + } + return sk_sp<SkImageFilter>(new SkDownSampleImageFilter(scale, std::move(input))); +} + sk_sp<SkSpecialImage> SkDownSampleImageFilter::onFilterImage(SkSpecialImage* source, const Context& ctx, SkIPoint* offset) const { |