| Index: include/core/SkComposeShader.h
|
| diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h
|
| index 956ba6e00d2ad003ae27817160bb359003d3d5c0..763a1daa45e21a8c624c48c511bf7525fd1406a8 100644
|
| --- a/include/core/SkComposeShader.h
|
| +++ b/include/core/SkComposeShader.h
|
| @@ -84,4 +84,46 @@ private:
|
| typedef SkShader INHERITED;
|
| };
|
|
|
| +#if SK_SUPPORT_GPU
|
| +
|
| +#include "SkString.h"
|
| +#include "../gpu/GrFragmentProcessor.h"
|
| +
|
| +/////////////////////////////////////////////////////////////////////
|
| +
|
| +class GrComposeEffect : public GrFragmentProcessor {
|
| +public:
|
| +
|
| + static GrFragmentProcessor* Create(const GrFragmentProcessor* fpA,
|
| + const GrFragmentProcessor* fpB,
|
| + SkXfermode::Mode mode);
|
| + const char* name() const override {return fName.c_str(); }
|
| + void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
|
| +
|
| + SkXfermode::Mode getMode() const { return fMode; }
|
| + int getShaderAChildIndex() const { return fShaderAChildIndex; }
|
| + int getShaderBChildIndex() const { return fShaderBChildIndex; }
|
| +
|
| +protected:
|
| + bool onIsEqual(const GrFragmentProcessor&) const override;
|
| + void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
|
| +
|
| +private:
|
| + GrComposeEffect(const GrFragmentProcessor* fpA, const GrFragmentProcessor* fpB,
|
| + SkXfermode::Mode mode);
|
| +
|
| + GrGLFragmentProcessor* onCreateGLInstance() const override;
|
| +
|
| + SkString fName;
|
| + int fShaderAChildIndex;
|
| + int fShaderBChildIndex;
|
| + SkXfermode::Mode fMode;
|
| +
|
| + GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
|
| +
|
| + typedef GrFragmentProcessor INHERITED;
|
| +};
|
| +
|
| +#endif
|
| +
|
| #endif
|
|
|