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

Unified Diff: include/core/SkImageFilter.h

Issue 13602013: Allow single-pass filters (which use asNewEffect()) to participate in the image filter DAG. This w… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove SkSinglePassImageFilter class; move impl into SkImageFilter::filterImageGPU(). Created 7 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
Index: include/core/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 6cc53c0de0ad16711cd3f8448f6584c86d1b0fda..ff034534f6d1504ca992164ab27f4ac8e7380397 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -93,7 +93,7 @@ public:
* The effect can assume its vertexCoords space maps 1-to-1 with texels
* in the texture.
*/
- virtual bool asNewEffect(GrEffectRef** effect, GrTexture*) const;
+ virtual GrEffectRef* asNewEffect(GrTexture*) const;
/**
* Returns true if the filter can be processed on the GPU. This is most
@@ -104,11 +104,14 @@ public:
virtual bool canFilterImageGPU() const;
/**
- * Process this image filter on the GPU. 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.
- * The default implementation returns returns false and ignores the
- * result parameter.
+ * Process this image filter on the GPU. This is most often used for
+ * multi-pass efefects, where intermediate results must be rendered to
+ * textures. For single-pass effects, use asNewEffect(). 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. The default implementation does single-pass processing
+ * using asNewEffect(). If asNewEffect() returns NULL, the default
+ * implementation returns false.
*/
virtual bool filterImageGPU(Proxy*, const SkBitmap& src, SkBitmap* result);
« no previous file with comments | « gyp/effects.gypi ('k') | include/core/SkImageFilterUtils.h » ('j') | src/core/SkImageFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698