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

Unified Diff: include/core/SkXfermode.h

Issue 16125008: Implement SkXfermode image filter (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add new case to xfermodeimagefilter GM; revert changes to arithmode GM Created 7 years, 7 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 | « gyp/gmslides.gypi ('k') | include/effects/SkXfermodeImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkXfermode.h
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index f960e14af7c3bf9f8e095e0204b169510e2b4904..03ca1014e6d8c1c5d430a551a68c2b16fbbe3f98 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -15,6 +15,7 @@
class GrContext;
class GrEffectRef;
+class GrTexture;
class SkString;
/** \class SkXfermode
@@ -197,12 +198,16 @@ public:
it and own a ref to it. Since the xfermode may or may not assign *effect, the caller should
set *effect to NULL beforehand. If the function returns true and *effect is NULL then the
src and dst coeffs will be applied to the draw. When *effect is non-NULL the coeffs are
- ignored.
+ ignored. background specifies the texture to use as the background for compositing, and
+ should be accessed in the effect's fragment shader. If NULL, the effect should request
+ access to destination color (setWillReadDstColor()), and use that in the fragment shader
+ (builder->dstColor()).
*/
virtual bool asNewEffectOrCoeff(GrContext*,
GrEffectRef** effect,
Coeff* src,
- Coeff* dst) const;
+ Coeff* dst,
+ GrTexture* background = NULL) const;
/**
* The same as calling xfermode->asNewEffect(...), except that this also checks if the xfermode
@@ -212,7 +217,8 @@ public:
GrContext*,
GrEffectRef** effect,
Coeff* src,
- Coeff* dst);
+ Coeff* dst,
+ GrTexture* background = NULL);
SkDEVCODE(virtual void toString(SkString* str) const = 0;)
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
« no previous file with comments | « gyp/gmslides.gypi ('k') | include/effects/SkXfermodeImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698