| Index: src/gpu/gl/GrGLProgram.cpp
|
| diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
|
| index c270858ec3cf82b3ed1b4184b849c550f0ae85db..6a433e17c5a5bbd4228402a179d4a3a9c3b51236 100644
|
| --- a/src/gpu/gl/GrGLProgram.cpp
|
| +++ b/src/gpu/gl/GrGLProgram.cpp
|
| @@ -31,11 +31,11 @@
|
| const BuiltinUniformHandles& builtinUniforms,
|
| GrGLuint programID,
|
| const UniformInfoArray& uniforms,
|
| - const SkTArray<GrGLSampler>& samplers,
|
| const VaryingInfoArray& pathProcVaryings,
|
| GrGLSLPrimitiveProcessor* geometryProcessor,
|
| GrGLSLXferProcessor* xferProcessor,
|
| - const GrGLSLFragProcs& fragmentProcessors)
|
| + const GrGLSLFragProcs& fragmentProcessors,
|
| + SkTArray<UniformHandle>* passSamplerUniforms)
|
| : fBuiltinUniformHandles(builtinUniforms)
|
| , fProgramID(programID)
|
| , fGeometryProcessor(geometryProcessor)
|
| @@ -44,9 +44,12 @@
|
| , fDesc(desc)
|
| , fGpu(gpu)
|
| , fProgramDataManager(gpu, programID, uniforms, pathProcVaryings) {
|
| + fSamplerUniforms.swap(passSamplerUniforms);
|
| // Assign texture units to sampler uniforms one time up front.
|
| GL_CALL(UseProgram(fProgramID));
|
| - fProgramDataManager.setSamplers(samplers);
|
| + for (int i = 0; i < fSamplerUniforms.count(); i++) {
|
| + fProgramDataManager.setSampler(fSamplerUniforms[i], i);
|
| + }
|
| }
|
|
|
| GrGLProgram::~GrGLProgram() {
|
|
|