OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLProgram.h" | 8 #include "GrGLProgram.h" |
9 | 9 |
10 #include "GrAllocator.h" | 10 #include "GrAllocator.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 void GrGLProgram::bindTextures(const GrProcessor& processor, | 135 void GrGLProgram::bindTextures(const GrProcessor& processor, |
136 bool allowSRGBInputs, | 136 bool allowSRGBInputs, |
137 int* nextSamplerIdx) { | 137 int* nextSamplerIdx) { |
138 for (int i = 0; i < processor.numTextures(); ++i) { | 138 for (int i = 0; i < processor.numTextures(); ++i) { |
139 const GrTextureAccess& access = processor.textureAccess(i); | 139 const GrTextureAccess& access = processor.textureAccess(i); |
140 fGpu->bindTexture((*nextSamplerIdx)++, access.getParams(), | 140 fGpu->bindTexture((*nextSamplerIdx)++, access.getParams(), |
141 allowSRGBInputs, static_cast<GrGLTexture*>(access.getT
exture())); | 141 allowSRGBInputs, static_cast<GrGLTexture*>(access.getT
exture())); |
142 } | 142 } |
143 for (int i = 0; i < processor.numBuffers(); ++i) { | 143 for (int i = 0; i < processor.numBuffers(); ++i) { |
144 const GrBufferAccess& access = processor.bufferAccess(i); | 144 const GrBufferAccess& access = processor.bufferAccess(i); |
145 fGpu->bindTexelBuffer((*nextSamplerIdx)++, access.offsetInBytes(), acces
s.texelConfig(), | 145 fGpu->bindTexelBuffer((*nextSamplerIdx)++, access.texelConfig(), |
146 static_cast<GrGLBuffer*>(access.buffer())); | 146 static_cast<GrGLBuffer*>(access.buffer())); |
147 } | 147 } |
148 } | 148 } |
OLD | NEW |