Index: src/gpu/gl/GrGLShaderBuilder.cpp |
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp |
index 36eb6d5169ebd23a3eb7104f801ab8bb102ac9c9..5ed8f0da09c5bd90fed30f10a117f45a55d3048b 100644 |
--- a/src/gpu/gl/GrGLShaderBuilder.cpp |
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp |
@@ -110,9 +110,6 @@ GrGLShaderBuilder::GrGLShaderBuilder(const GrGLContextInfo& ctxInfo, |
, fUsesGS(false) |
#endif |
, fSetupFragPosition(false) |
- , fRTHeightUniform(GrGLUniformManager::kInvalidUniformHandle) |
- , fDstCopyTopLeftUniform (GrGLUniformManager::kInvalidUniformHandle) |
- , fDstCopyScaleUniform (GrGLUniformManager::kInvalidUniformHandle) |
, fTopLeftFragPosRead(kTopLeftFragPosRead_FragPosKey == desc.getHeader().fFragPosKey) { |
const GrGLProgramDesc::KeyHeader& header = desc.getHeader(); |
@@ -391,7 +388,7 @@ GrGLUniformManager::UniformHandle GrGLShaderBuilder::addUniformArray(uint32_t vi |
GrAssert(0 != visibility); |
BuilderUniform& uni = fUniforms.push_back(); |
- UniformHandle h = index_to_handle(fUniforms.count() - 1); |
+ UniformHandle h = GrGLUniformManager::UniformHandle::CreateFromUniformIndex(fUniforms.count() - 1); |
GR_DEBUGCODE(UniformHandle h2 =) |
fUniformManager.appendUniform(type, count); |
// We expect the uniform manager to initially have no uniforms and that all uniforms are added |
@@ -418,10 +415,6 @@ GrGLUniformManager::UniformHandle GrGLShaderBuilder::addUniformArray(uint32_t vi |
return h; |
} |
-const GrGLShaderVar& GrGLShaderBuilder::getUniformVariable(UniformHandle u) const { |
- return fUniforms[handle_to_index(u)].fVariable; |
-} |
- |
bool GrGLShaderBuilder::addAttribute(GrSLType type, |
const char* name) { |
for (int i = 0; i < fVSAttrs.count(); ++i) { |
@@ -512,7 +505,7 @@ const char* GrGLShaderBuilder::fragmentPosition() { |
// temporarily change the stage index because we're inserting non-stage code. |
CodeStage::AutoStageRestore csar(&fCodeStage, NULL); |
- GrAssert(GrGLUniformManager::kInvalidUniformHandle == fRTHeightUniform); |
+ GrAssert(!fRTHeightUniform.isValid()); |
const char* rtHeightName; |
fRTHeightUniform = this->addUniform(kFragment_ShaderType, |
@@ -524,7 +517,7 @@ const char* GrGLShaderBuilder::fragmentPosition() { |
kCoordName, rtHeightName); |
fSetupFragPosition = true; |
} |
- GrAssert(GrGLUniformManager::kInvalidUniformHandle != fRTHeightUniform); |
+ GrAssert(fRTHeightUniform.isValid()); |
return kCoordName; |
} |
} |