Index: src/gpu/gl/GrGpuGL.h |
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h |
index b0195bbaed5b04e2039088cdc986f6184ebc10b9..a59654a0f8af792798a418cf6b35f7991879fd04 100644 |
--- a/src/gpu/gl/GrGpuGL.h |
+++ b/src/gpu/gl/GrGpuGL.h |
@@ -37,8 +37,19 @@ public: |
GrGLVersion glVersion() const { return fGLContext.info().version(); } |
GrGLSLGeneration glslGeneration() const { return fGLContext.info().glslGeneration(); } |
- // Used by GrGLProgram to bind necessary textures for GrGLEffects. |
+ // Used by GrGLProgram and GrGLTexGenProgramEffects to configure OpenGL state. |
void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* texture); |
+ void setProjectionMatrix(const SkMatrix& matrix, |
+ const SkISize& renderTargetSize, |
+ GrSurfaceOrigin renderTargetOrigin); |
+ enum TexGenComponents { |
+ kS_TexGenComponents = 1, |
+ kST_TexGenComponents = 2, |
+ kSTR_TexGenComponents = 3 |
+ }; |
+ void enableTexGen(int unitIdx, TexGenComponents, const GrGLfloat* coefficients); |
+ void enableTexGen(int unitIdx, TexGenComponents, const SkMatrix& matrix); |
+ void disableUnusedTexGen(int numUsedTexCoordSets); |
bool programUnitTest(int maxStages); |
@@ -213,9 +224,6 @@ private: |
#endif |
}; |
- // sets the matrix for path stenciling (uses the GL fixed pipe matrices) |
- void flushPathStencilMatrix(); |
- |
// flushes dithering, color-mask, and face culling stat |
void flushMiscFixedFunctionState(); |
@@ -432,6 +440,14 @@ private: |
TriState fHWDitherEnabled; |
GrRenderTarget* fHWBoundRenderTarget; |
SkTArray<GrTexture*, true> fHWBoundTextures; |
+ |
+ struct TexGenData { |
+ GrGLenum fMode; |
+ GrGLint fNumComponents; |
+ GrGLfloat fCoefficients[3 * 3]; |
+ }; |
+ int fHWActiveTexGenSets; |
+ SkTArray<TexGenData, true> fHWTexGenSettings; |
///@} |
// we record what stencil format worked last time to hopefully exit early |