Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: src/gpu/gl/GrGLUniformHandler.cpp

Issue 1583793002: Make android scripts not warn about ADB in newer SDKs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUniformHandler.cpp
diff --git a/src/gpu/gl/GrGLUniformHandler.cpp b/src/gpu/gl/GrGLUniformHandler.cpp
index c4189267f10a144fb02c50df6ef9c9c94998a985..926d72973d3b4464a375962ce5d3bbb855d421b8 100644
--- a/src/gpu/gl/GrGLUniformHandler.cpp
+++ b/src/gpu/gl/GrGLUniformHandler.cpp
@@ -85,14 +85,15 @@ void GrGLUniformHandler::appendUniformDecls(GrShaderFlags visibility, SkString*
void GrGLUniformHandler::bindUniformLocations(GrGLuint programID, const GrGLCaps& caps) {
if (caps.bindUniformLocationSupport()) {
- int count = fUniforms.count();
- for (int i = 0; i < count; ++i) {
+ int uniformCount = fUniforms.count();
+ for (int i = 0; i < uniformCount; ++i) {
GL_CALL(BindUniformLocation(programID, i, fUniforms[i].fVariable.c_str()));
fUniforms[i].fLocation = i;
}
for (int i = 0; i < fSamplers.count(); ++i) {
- GL_CALL(BindUniformLocation(programID, i, fSamplers[i].fShaderVar.c_str()));
- fSamplers[i].fLocation = i;
+ GrGLint location = i + uniformCount;
+ GL_CALL(BindUniformLocation(programID, location, fSamplers[i].fShaderVar.c_str()));
+ fSamplers[i].fLocation = location;
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698