| Index: src/gpu/gl/GrGLShaderBuilder.h
|
| ===================================================================
|
| --- src/gpu/gl/GrGLShaderBuilder.h (revision 8241)
|
| +++ src/gpu/gl/GrGLShaderBuilder.h (working copy)
|
| @@ -80,7 +80,7 @@
|
| kFragment_ShaderType = 0x4,
|
| };
|
|
|
| - GrGLShaderBuilder(const GrGLContextInfo&, GrGLUniformManager&);
|
| + GrGLShaderBuilder(const GrGLContextInfo&, GrGLUniformManager&, bool explicitLocalCoords);
|
|
|
| /**
|
| * Called by GrGLEffects to add code to one of the shaders.
|
| @@ -205,7 +205,17 @@
|
| */
|
| const GrGLShaderVar& positionAttribute() const { return *fPositionVar; }
|
|
|
| + /** Returns a vertex attribute that represents the local coords in the VS. This may be the same
|
| + as positionAttribute() or it may not be. It depends upon whether the rendering code
|
| + specified explicit local coords or not in the GrDrawState. */
|
| + const GrGLShaderVar& localCoordsAttribute() const { return *fLocalCoordsVar; }
|
| +
|
| /**
|
| + * Are explicit local coordinates provided as input to the vertex shader.
|
| + */
|
| + bool hasExplicitLocalCoords() const { return (fLocalCoordsVar != fPositionVar); }
|
| +
|
| + /**
|
| * Interfaces used by GrGLProgram.
|
| * TODO: Hide these from the GrEffects using friend or splitting this into two related classes.
|
| * Also, GrGLProgram's shader string construction should be moved to this class.
|
| @@ -223,7 +233,6 @@
|
| GrBackendEffectFactory::EffectKey key,
|
| const char* fsInColor, // NULL means no incoming color
|
| const char* fsOutColor,
|
| - const char* vsInCoord,
|
| SkTArray<GrGLUniformManager::UniformHandle, true>* samplerHandles);
|
| GrGLUniformManager::UniformHandle getRTHeightUniform() const { return fRTHeightUniform; }
|
|
|
| @@ -290,6 +299,8 @@
|
| SkSTArray<10, AttributePair, true> fEffectAttributes;
|
|
|
| GrGLShaderVar* fPositionVar;
|
| + GrGLShaderVar* fLocalCoordsVar;
|
| +
|
| };
|
|
|
| #endif
|
|
|