Reland r6330 thru r6333 but do without enabling GL_ARB_fragment_coord_conventions on Intel GPUs.
git-svn-id: http://skia.googlecode.com/svn/trunk@6048 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 520f6a0..2500417 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -70,7 +70,7 @@
* This function uploads uniforms and calls each GrCustomStage's setData. It is called before a
* draw occurs using the program after the program has already been bound.
*/
- void setData(const GrDrawState& drawState) const;
+ void setData(const GrDrawState& drawState);
// Parameters that affect code generation
// These structs should be kept compact; they are the input to an
@@ -219,12 +219,16 @@
UniformHandle fColorUni;
UniformHandle fCoverageUni;
UniformHandle fColorFilterUni;
+ // We use the render target height to provide a y-down frag coord when specifying
+ // origin_upper_left is not supported.
+ UniformHandle fRTHeight;
StageUniforms fStages[GrDrawState::kNumStages];
Uniforms() {
fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
fColorUni = GrGLUniformManager::kInvalidUniformHandle;
fCoverageUni = GrGLUniformManager::kInvalidUniformHandle;
fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle;
+ fRTHeight = GrGLUniformManager::kInvalidUniformHandle;
}
};
@@ -244,6 +248,7 @@
GrColor fColor;
GrColor fCoverage;
GrColor fColorFilterColor;
+ int fRTHeight;
/// When it is sent to GL, the texture matrix will be flipped if the texture orientation
/// (below) requires.
GrMatrix fTextureMatrices[GrDrawState::kNumStages];