Index: include/core/SkComposeShader.h |
diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h |
index 41be197eb7769f766a77da2ddb866a9b2df43346..13163dcdf2df7aecd8424496de85af353f363264 100644 |
--- a/include/core/SkComposeShader.h |
+++ b/include/core/SkComposeShader.h |
@@ -88,4 +88,35 @@ private: |
typedef SkShader INHERITED; |
}; |
+#if SK_SUPPORT_GPU |
bsalomon
2015/09/08 15:10:57
I don't think we should be exposing this object vi
wangyix
2015/09/09 17:32:35
GrComposeEffect::onCreateGLInstance() needs GrGLCo
bsalomon
2015/09/09 17:34:56
move it there too?
wangyix
2015/09/09 17:41:08
Is it weird to have GL-specific stuff in GrXfermod
|
+ |
+#include "SkString.h" |
tomhudson
2015/09/02 20:02:36
Move the #includes to the top, please.
egdaniel
2015/09/02 20:12:44
So I'm not sure what our official style is, but it
|
+#include "../gpu/GrFragmentProcessor.h" |
+ |
+///////////////////////////////////////////////////////////////////// |
+ |
+class GrComposeEffect : public GrFragmentProcessor { |
+public: |
+ GrComposeEffect(const GrFragmentProcessor* fpA, const GrFragmentProcessor* fpB, |
+ SkXfermode::Mode mode); |
+ const char* name() const override { return "ComposeShader"; } |
+ void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; |
+ |
+ SkXfermode::Mode getMode() const { return fMode; } |
+ |
+protected: |
+ bool onIsEqual(const GrFragmentProcessor&) const override; |
+ void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
+ |
+private: |
+ GrGLFragmentProcessor* onCreateGLInstance() const override; |
+ |
+ SkXfermode::Mode fMode; |
+ |
+ GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
+ |
+ typedef GrFragmentProcessor INHERITED; |
+}; |
+#endif |
+ |
#endif |