Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: include/core/SkImageFilter.h

Issue 1879643003: Switch AlphaThresholdFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix serialize-8888 config (deserialize crop rect) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/imagealphathreshold.cpp ('k') | include/effects/SkAlphaThresholdFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 8a8e512254f2e42e8515fee9844b18898416f319..d90e74de7749dec99cbfca9e10213c667b170957 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -17,6 +17,7 @@
#include "SkRect.h"
#include "SkSurfaceProps.h"
+class GrContext;
class GrFragmentProcessor;
class GrTexture;
class SkBaseDevice;
@@ -196,6 +197,13 @@ public:
virtual bool filterImageGPUDeprecated(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const;
+#if SK_SUPPORT_GPU
+ static sk_sp<SkSpecialImage> DrawWithFP(GrContext* context,
+ sk_sp<GrFragmentProcessor> fp,
+ const SkIRect& bounds,
+ SkImageFilter::Proxy* proxy);
+#endif
+
/**
* Returns whether this image filter is a color filter and puts the color filter into the
* "filterPtr" parameter if it can. Does nothing otherwise.
@@ -418,13 +426,12 @@ protected:
return false;
}
- /** Given a "srcBounds" rect, computes destination bounds for this
- * destination bounds for this filter. "dstBounds" are computed by
- * transforming the crop rect by the context's CTM, applying it to the
- * initial bounds, and intersecting the result with the context's clip
- * bounds. "srcBounds" (if non-null) are computed by intersecting the
- * initial bounds with "dstBounds", to ensure that we never sample
- * outside of the crop rect (this restriction may be relaxed in the
+ /** Given a "srcBounds" rect, computes destination bounds for this filter.
+ * "dstBounds" are computed by transforming the crop rect by the context's
+ * CTM, applying it to the initial bounds, and intersecting the result with
+ * the context's clip bounds. "srcBounds" (if non-null) are computed by
+ * intersecting the initial bounds with "dstBounds", to ensure that we never
+ * sample outside of the crop rect (this restriction may be relaxed in the
* future).
*/
bool applyCropRect(const Context&, const SkIRect& srcBounds, SkIRect* dstBounds) const;
« no previous file with comments | « gm/imagealphathreshold.cpp ('k') | include/effects/SkAlphaThresholdFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698