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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1376293003: Fix for 2056 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback incorporated Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrGLProgramBuilder.h" 8 #include "GrGLProgramBuilder.h"
9 9
10 #include "GrAutoLocaleSetter.h" 10 #include "GrAutoLocaleSetter.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 checkLinkStatus(programID); 414 checkLinkStatus(programID);
415 } 415 }
416 this->resolveProgramResourceLocations(programID); 416 this->resolveProgramResourceLocations(programID);
417 417
418 this->cleanupShaders(shadersToDelete); 418 this->cleanupShaders(shadersToDelete);
419 419
420 return this->createProgram(programID); 420 return this->createProgram(programID);
421 } 421 }
422 422
423 void GrGLProgramBuilder::bindProgramResourceLocations(GrGLuint programID) { 423 void GrGLProgramBuilder::bindProgramResourceLocations(GrGLuint programID) {
424 bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation != nullptr; 424 if (fGpu->glCaps().bindUniformLocationSupport()) {
425 if (usingBindUniform) {
426 int count = fUniforms.count(); 425 int count = fUniforms.count();
427 for (int i = 0; i < count; ++i) { 426 for (int i = 0; i < count; ++i) {
428 GL_CALL(BindUniformLocation(programID, i, fUniforms[i].fVariable.c_s tr())); 427 GL_CALL(BindUniformLocation(programID, i, fUniforms[i].fVariable.c_s tr()));
429 fUniforms[i].fLocation = i; 428 fUniforms[i].fLocation = i;
430 } 429 }
431 } 430 }
432 431
433 fFS.bindFragmentShaderLocations(programID); 432 fFS.bindFragmentShaderLocations(programID);
434 433
435 // handle NVPR separable varyings 434 // handle NVPR separable varyings
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 514 }
516 515
517 //////////////////////////////////////////////////////////////////////////////// /////////////////// 516 //////////////////////////////////////////////////////////////////////////////// ///////////////////
518 517
519 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 518 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
520 int numProcs = fProcs.count(); 519 int numProcs = fProcs.count();
521 for (int i = 0; i < numProcs; ++i) { 520 for (int i = 0; i < numProcs; ++i) {
522 delete fProcs[i]; 521 delete fProcs[i];
523 } 522 }
524 } 523 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698