diff options
author | 2016-03-24 05:01:23 -0700 | |
---|---|---|
committer | 2016-03-24 05:01:23 -0700 | |
commit | 1579e3c376a9ee8c694a64f9c87457cea13ba442 (patch) | |
tree | 1582fd026d9ca7e81be3d8eb11b573887cba0a3a /include | |
parent | 910f7ec7e79cd051f69b47c3e19d4fda2adbcef4 (diff) |
Switch SkBlurImageFilter over to new onFilterImage interface
This CL relies on:
https://codereview.chromium.org/1787883002/ (Add SkSpecialImage::extractSubset & NewFromPixmap)
https://codereview.chromium.org/1808743003/ (Allow SkGpuDevice::drawSprite to handle subset SkBitmaps)
https://codereview.chromium.org/1813813002/ (Add SkSpecialImage::makeTextureImage entry point)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1785643003
Committed: https://skia.googlesource.com/skia/+/3c935bc87020bfd19a08922f7394db3a801d168b
Review URL: https://codereview.chromium.org/1785643003
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkDevice.h | 11 | ||||
-rw-r--r-- | include/effects/SkBlurImageFilter.h | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index 7339342256..5d903fd074 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -378,6 +378,12 @@ protected: return NULL; } + /** + * Calls through to drawSprite, processing the imagefilter. + */ + virtual void drawBitmapAsSpriteWithImageFilter(const SkDraw&, const SkBitmap&, + int x, int y, const SkPaint&); + private: friend class SkCanvas; friend struct DeviceCM; //for setMatrixClip @@ -388,11 +394,6 @@ private: friend class SkNoPixelsBitmapDevice; friend class SkSurface_Raster; - /** - * Calls through to drawSprite, processing imagefilter as needed. - */ - void drawBitmapAsSprite(const SkDraw&, const SkBitmap&, int x, int y, const SkPaint&); - // used to change the backend's pixels (and possibly config/rowbytes) // but cannot change the width/height, so there should be no change to // any clip information. diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index 8a2d2118e1..46d073efdd 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -28,12 +28,9 @@ public: protected: void flatten(SkWriteBuffer&) const override; - bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, - SkIPoint* offset) const override; + SkSpecialImage* onFilterImage(SkSpecialImage* source, const Context&, + SkIPoint* offset) const override; SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix&, MapDirection) const override; - bool canFilterImageGPU() const override { return true; } - bool filterImageGPUDeprecated(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* result, SkIPoint* offset) const override; private: SkBlurImageFilter(SkScalar sigmaX, |