| Index: include/gpu/GrEffect.h
|
| diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
|
| index b7a6d17af9527ed0a11c3d5d58376a6cfdc62702..102b9d4b961ba89743c8b002426182633ad7b83f 100644
|
| --- a/include/gpu/GrEffect.h
|
| +++ b/include/gpu/GrEffect.h
|
| @@ -11,14 +11,15 @@
|
| #include "GrColor.h"
|
| #include "GrEffectUnitTest.h"
|
| #include "GrProgramElement.h"
|
| +#include "GrShaderVar.h"
|
| #include "GrTextureAccess.h"
|
| #include "GrTypesPriv.h"
|
| +#include "SkString.h"
|
|
|
| class GrBackendEffectFactory;
|
| class GrContext;
|
| class GrCoordTransform;
|
|
|
| -
|
| /** Provides custom vertex shader, fragment shader, uniform data for a particular stage of the
|
| Ganesh shading pipeline.
|
| Subclasses must have a function that produces a human-readable name:
|
| @@ -114,14 +115,10 @@ public:
|
| (To set this value the effect must inherit from GrEffect.) */
|
| bool requiresVertexShader() const { return fRequiresVertexShader; }
|
|
|
| - int numVertexAttribs() const {
|
| - SkASSERT(0 == fVertexAttribTypes.count() || fRequiresVertexShader);
|
| - return fVertexAttribTypes.count();
|
| - }
|
| -
|
| - GrSLType vertexAttribType(int index) const { return fVertexAttribTypes[index]; }
|
| -
|
| static const int kMaxVertexAttribs = 2;
|
| + typedef SkSTArray<kMaxVertexAttribs, GrShaderVar, true> VertexAttribArray;
|
| +
|
| + const VertexAttribArray& getVertexAttribs() const { return fVertexAttribs; }
|
|
|
| void* operator new(size_t size);
|
| void operator delete(void* target);
|
| @@ -193,11 +190,11 @@ private:
|
| getFactory()).*/
|
| virtual bool onIsEqual(const GrEffect& other) const = 0;
|
|
|
| - friend class GrVertexEffect; // to set fRequiresVertexShader and build fVertexAttribTypes.
|
| + friend class GrGeometryProcessor; // to set fRequiresVertexShader and build fVertexAttribTypes.
|
|
|
| SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
|
| SkSTArray<4, const GrTextureAccess*, true> fTextureAccesses;
|
| - SkSTArray<kMaxVertexAttribs, GrSLType, true> fVertexAttribTypes;
|
| + VertexAttribArray fVertexAttribs;
|
| bool fWillReadDstColor;
|
| bool fWillReadFragmentPosition;
|
| bool fWillUseInputColor;
|
|
|