Index: src/gpu/glsl/GrGLSLShaderBuilder.cpp |
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp |
index 1031f84460acf3089afac81ee8ffd5c4f93c5005..b866fbce2a3b941c7272c1dd3941d7121aaf9558 100644 |
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp |
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp |
@@ -68,28 +68,28 @@ void GrGLSLShaderBuilder::appendTextureLookup(SkString* out, |
GrSLType varyingType) const { |
const GrGLSLCaps* glslCaps = fProgramBuilder->glslCaps(); |
GrGLSLUniformHandler* uniformHandler = fProgramBuilder->uniformHandler(); |
- GrSLType samplerType = uniformHandler->getUniformVariable(sampler.fSamplerUniform).getType(); |
+ GrSLType samplerType = sampler.type(); |
if (samplerType == kSampler2DRect_GrSLType) { |
if (varyingType == kVec2f_GrSLType) { |
out->appendf("%s(%s, textureSize(%s) * %s)", |
GrGLSLTexture2DFunctionName(varyingType, samplerType, |
glslCaps->generation()), |
- uniformHandler->getUniformCStr(sampler.fSamplerUniform), |
- uniformHandler->getUniformCStr(sampler.fSamplerUniform), |
+ sampler.getSamplerFunctionName(), |
+ sampler.getSamplerFunctionName(), |
coordName); |
} else { |
out->appendf("%s(%s, vec3(textureSize(%s) * %s.xy, %s.z))", |
GrGLSLTexture2DFunctionName(varyingType, samplerType, |
glslCaps->generation()), |
- uniformHandler->getUniformCStr(sampler.fSamplerUniform), |
- uniformHandler->getUniformCStr(sampler.fSamplerUniform), |
+ sampler.getSamplerFunctionName(), |
+ sampler.getSamplerFunctionName(), |
coordName, |
coordName); |
} |
} else { |
out->appendf("%s(%s, %s)", |
GrGLSLTexture2DFunctionName(varyingType, samplerType, glslCaps->generation()), |
- uniformHandler->getUniformCStr(sampler.fSamplerUniform), |
+ sampler.getSamplerFunctionName(), |
coordName); |
} |