Index: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp |
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp |
index eea8850f8ff334efc8b275247f5ff3aac0b1918e..d06c2f348872b7c8c2406c2d338156e9785d785c 100644 |
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp |
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp |
@@ -143,17 +143,15 @@ const char* GrGLFragmentShaderBuilder::fragmentPosition() { |
static const char* kTempName = "tmpXYFragCoord"; |
static const char* kCoordName = "fragCoordYDown"; |
if (!fSetupFragPosition) { |
- // temporarily change the stage index because we're inserting non-stage code. |
- GrGLProgramBuilder::AutoStageRestore asr(fProgramBuilder); |
SkASSERT(!fProgramBuilder->fUniformHandles.fRTHeightUni.isValid()); |
const char* rtHeightName; |
fProgramBuilder->fUniformHandles.fRTHeightUni = |
- fProgramBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
- kFloat_GrSLType, |
- kDefault_GrSLPrecision, |
- "RTHeight", |
- &rtHeightName); |
+ fProgramBuilder->addFragPosUniform(GrGLProgramBuilder::kFragment_Visibility, |
+ kFloat_GrSLType, |
+ kDefault_GrSLPrecision, |
+ "RTHeight", |
+ &rtHeightName); |
// The Adreno compiler seems to be very touchy about access to "gl_FragCoord". |
// Accessing glFragCoord.zw can cause a program to fail to link. Additionally, |