aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgram.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLProgram.cpp')
-rw-r--r--src/gpu/gl/GrGLProgram.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 6a433e17c5..c270858ec3 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -31,11 +31,11 @@ GrGLProgram::GrGLProgram(GrGLGpu* gpu,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
const UniformInfoArray& uniforms,
+ const SkTArray<GrGLSampler>& samplers,
const VaryingInfoArray& pathProcVaryings,
GrGLSLPrimitiveProcessor* geometryProcessor,
GrGLSLXferProcessor* xferProcessor,
- const GrGLSLFragProcs& fragmentProcessors,
- SkTArray<UniformHandle>* passSamplerUniforms)
+ const GrGLSLFragProcs& fragmentProcessors)
: fBuiltinUniformHandles(builtinUniforms)
, fProgramID(programID)
, fGeometryProcessor(geometryProcessor)
@@ -44,12 +44,9 @@ GrGLProgram::GrGLProgram(GrGLGpu* gpu,
, 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));
- for (int i = 0; i < fSamplerUniforms.count(); i++) {
- fProgramDataManager.setSampler(fSamplerUniforms[i], i);
- }
+ fProgramDataManager.setSamplers(samplers);
}
GrGLProgram::~GrGLProgram() {