aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/effects
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/effects')
-rw-r--r--include/gpu/effects/GrCustomXfermode.h11
-rw-r--r--include/gpu/effects/GrXfermodeFragmentProcessor.h10
2 files changed, 12 insertions, 9 deletions
diff --git a/include/gpu/effects/GrCustomXfermode.h b/include/gpu/effects/GrCustomXfermode.h
index 557397077e..bcbd5833ca 100644
--- a/include/gpu/effects/GrCustomXfermode.h
+++ b/include/gpu/effects/GrCustomXfermode.h
@@ -10,21 +10,14 @@
#include "SkXfermode.h"
-class GrFragmentProcessor;
class GrTexture;
/**
* Custom Xfer modes are used for blending when the blend mode cannot be represented using blend
- * coefficients. It is assumed that all blending is done within the processors' emit code. For each
- * blend mode there should be a matching fragment processor (used when blending with a background
- * texture) and xfer processor.
+ * coefficients.
*/
namespace GrCustomXfermode {
- bool IsSupportedMode(SkXfermode::Mode mode);
-
- GrFragmentProcessor* CreateFP(GrProcessorDataManager*, SkXfermode::Mode mode,
- GrTexture* background);
-
+ bool IsSupportedMode(SkXfermode::Mode mode);
GrXPFactory* CreateXPFactory(SkXfermode::Mode mode);
};
diff --git a/include/gpu/effects/GrXfermodeFragmentProcessor.h b/include/gpu/effects/GrXfermodeFragmentProcessor.h
index d93b400b8b..e2d1c0a544 100644
--- a/include/gpu/effects/GrXfermodeFragmentProcessor.h
+++ b/include/gpu/effects/GrXfermodeFragmentProcessor.h
@@ -13,6 +13,16 @@
class GrFragmentProcessor;
namespace GrXfermodeFragmentProcessor {
+ /** The color input to the returned processor is treated as the src and the passed in processor
+ is the dst. */
+ const GrFragmentProcessor* CreateFromDstProcessor(const GrFragmentProcessor* dst,
+ SkXfermode::Mode mode);
+
+ /** The color input to the returned processor is treated as the dst and the passed in processor
+ is the src. */
+ const GrFragmentProcessor* CreateFromSrcProcessor(const GrFragmentProcessor* src,
+ SkXfermode::Mode mode);
+
const GrFragmentProcessor* CreateFromTwoProcessors(const GrFragmentProcessor* src,
const GrFragmentProcessor* dst,
SkXfermode::Mode mode);