aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar senorblanco <senorblanco@chromium.org>2016-04-18 10:32:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-18 10:32:02 -0700
commitf35566e8a2497cd7c7bcfeee00c507b3e8ba1587 (patch)
treea80023794f388bceafdd4e0bc962668fcf73fff0 /include
parent983294f78f11159a7def7fd2ea0c12f911d17688 (diff)
Remove deprecated paths from image filter infrastructure.
Now that there are no filterImageGPUDeprecated() implementations, we can being to rip out the deprecated infrastructure. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888243003 Committed: https://skia.googlesource.com/skia/+/6fb3cd7209849e665635ac17ef4eef4ad63e7f61 Review URL: https://codereview.chromium.org/1888243003
Diffstat (limited to 'include')
-rw-r--r--include/core/SkDevice.h22
-rw-r--r--include/core/SkImageFilter.h51
2 files changed, 0 insertions, 73 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 3a6d6ea5fc..83a7093607 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -280,28 +280,6 @@ protected:
*/
virtual const SkBitmap& onAccessBitmap() = 0;
- /**
- * Override and return true for filters that the device can handle
- * intrinsically. Doing so means that SkCanvas will pass-through this
- * filter to drawSprite and drawDevice (and potentially filterImage).
- * Returning false means the SkCanvas will have apply the filter itself,
- * and just pass the resulting image to the device.
- */
- virtual bool canHandleImageFilter(const SkImageFilter*) { return false; }
-
- /**
- * Related (but not required) to canHandleImageFilter, this method returns
- * true if the device could apply the filter to the src bitmap and return
- * the result (and updates offset as needed).
- * If the device does not recognize or support this filter,
- * it just returns false and leaves result and offset unchanged.
- */
- virtual bool filterImage(const SkImageFilter*, const SkBitmap&,
- const SkImageFilter::Context&,
- SkBitmap* /*result*/, SkIPoint* /*offset*/) {
- return false;
- }
-
protected:
virtual sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&);
virtual bool onPeekPixels(SkPixmap*) { return false; }
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index dcd25bf91b..554f9f8335 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -116,12 +116,6 @@ public:
virtual SkBaseDevice* createDevice(int width, int height,
TileUsage usage = kNever_TileUsage) = 0;
-
- // Returns true if the proxy handled the filter itself. If this returns
- // false then the filter's code will be called.
- virtual bool filterImage(const SkImageFilter*, const SkBitmap& src,
- const SkImageFilter::Context&,
- SkBitmap* result, SkIPoint* offset) = 0;
};
class DeviceProxy : public Proxy {
@@ -131,11 +125,6 @@ public:
SkBaseDevice* createDevice(int width, int height,
TileUsage usage = kNever_TileUsage) override;
- // Returns true if the proxy handled the filter itself. If this returns
- // false then the filter's code will be called.
- bool filterImage(const SkImageFilter*, const SkBitmap& src, const SkImageFilter::Context&,
- SkBitmap* result, SkIPoint* offset) override;
-
private:
SkBaseDevice* fDevice;
};
@@ -175,31 +164,6 @@ public:
SkIRect filterBounds(const SkIRect& src, const SkMatrix& ctm,
MapDirection = kReverse_MapDirection) const;
- /**
- * Returns true if the filter can be processed on the GPU. This is most
- * often used for multi-pass effects, where intermediate results must be
- * rendered to textures. For single-pass effects, use asFragmentProcessor().
- * The default implementation returns asFragmentProcessor(NULL, NULL, SkMatrix::I(),
- * SkIRect()).
- */
- virtual bool canFilterImageGPU() const { return false; }
-
- /**
- * Process this image filter on the GPU. This is most often used for
- * multi-pass effects, where intermediate results must be rendered to
- * textures. For single-pass effects, use asFragmentProcessor(). src is the
- * source image for processing, as a texture-backed bitmap. result is
- * the destination bitmap, which should contain a texture-backed pixelref
- * on success. offset is the amount to translate the resulting image
- * relative to the src when it is drawn. The default implementation does
- * single-pass processing using asFragmentProcessor().
- */
- virtual bool filterImageGPUDeprecated(Proxy*, const SkBitmap&, const Context&,
- SkBitmap*, SkIPoint*) const {
- SkASSERT(false);
- return false;
- }
-
#if SK_SUPPORT_GPU
static sk_sp<SkSpecialImage> DrawWithFP(GrContext* context,
sk_sp<GrFragmentProcessor> fp,
@@ -298,18 +262,6 @@ public:
const Context&,
SkIPoint* offset) const;
-#if SK_SUPPORT_GPU
- // Helper function which invokes GPU filter processing on the
- // input at the specified "index". If the input is null, it leaves
- // "result" and "offset" untouched, and returns true. If the input
- // has a GPU implementation, it will be invoked directly.
- // Otherwise, the filter will be processed in software and
- // uploaded to the GPU.
- bool filterInputGPUDeprecated(int index, SkImageFilter::Proxy* proxy,
- const SkBitmap& src, const Context&,
- SkBitmap* result, SkIPoint* offset) const;
-#endif
-
SK_TO_STRING_PUREVIRT()
SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter)
@@ -440,9 +392,6 @@ protected:
* which are not capable of processing a smaller source bitmap into a
* larger destination.
*/
- bool applyCropRectDeprecated(const Context&, Proxy* proxy, const SkBitmap& src,
- SkIPoint* srcOffset, SkIRect* bounds, SkBitmap* result) const;
-
sk_sp<SkSpecialImage> applyCropRect(const Context&, SkSpecialImage* src, SkIPoint* srcOffset,
SkIRect* bounds) const;