aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMaskFilter.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-20 14:49:21 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-20 14:49:30 +0000
commit4f7f197c09443232f02cd81f3ac7fb5a216acd05 (patch)
tree6a91b2fa6ead9aa6cce3355500ed85ba9b7dc126 /include/core/SkMaskFilter.h
parent3d628fe00a7d6cf4a375d758e7436f104d11417d (diff)
Revert "use GrFPArgs for maskfilters"
This reverts commit a99b39399522658d7e5ddee97d0e45aa9fceaf89. Reason for revert: try to unblock android roller Original change's description: > use GrFPArgs for maskfilters > > Bug: skia: > Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5 > Reviewed-on: https://skia-review.googlesource.com/97260 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com,reed@google.com Change-Id: Iefe8ed19bba75df86173dec53f5ed4f1ea8724d0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/97581 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkMaskFilter.h')
-rw-r--r--include/core/SkMaskFilter.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h
index 3e10dc9ad3..1714d17bca 100644
--- a/include/core/SkMaskFilter.h
+++ b/include/core/SkMaskFilter.h
@@ -6,6 +6,7 @@
* found in the LICENSE file.
*/
+
#ifndef SkMaskFilter_DEFINED
#define SkMaskFilter_DEFINED
@@ -17,7 +18,6 @@
class GrClip;
class GrContext;
-struct GrFPArgs;
class GrRenderTargetContext;
class GrPaint;
class GrFragmentProcessor;
@@ -69,18 +69,16 @@ public:
#if SK_SUPPORT_GPU
/**
- * Returns a processor if the filter can be expressed a single-pass GrProcessor without
- * requiring an explicit input mask. Per-pixel, the effect receives the incoming mask's
- * coverage as the input color and outputs the filtered covereage value. This means that each
- * pixel's filtered coverage must only depend on the unfiltered mask value for that pixel and
- * not on surrounding values.
- */
- std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(const GrFPArgs& args) const;
-
- /**
- * Returns true iff asFragmentProcessor() will return a processor
+ * Returns true if the filter can be expressed a single-pass GrProcessor without requiring an
+ * explicit input mask. Per-pixel, the effect receives the incoming mask's coverage as
+ * the input color and outputs the filtered covereage value. This means that each pixel's
+ * filtered coverage must only depend on the unfiltered mask value for that pixel and not on
+ * surrounding values.
+ *
+ * If effect is non-NULL, a new GrProcessor instance is stored in it. The caller assumes
+ * ownership of the effect and must unref it.
*/
- bool hasFragmentProcessor() const;
+ virtual bool asFragmentProcessor(GrFragmentProcessor**) const { return false; }
/**
* If asFragmentProcessor() fails the filter may be implemented on the GPU by a subclass
@@ -181,11 +179,6 @@ public:
protected:
SkMaskFilter() {}
-#if SK_SUPPORT_GPU
- virtual std::unique_ptr<GrFragmentProcessor> onAsFragmentProcessor(const GrFPArgs&) const;
- virtual bool onHasFragmentProcessor() const;
-#endif
-
enum FilterReturn {
kFalse_FilterReturn,
kTrue_FilterReturn,