OLD | NEW |
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 "gl/GrGLGeometryProcessor.h" | 10 #include "gl/GrGLGeometryProcessor.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 } | 422 } |
423 | 423 |
424 bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation
!= NULL; | 424 bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation
!= NULL; |
425 if (usingBindUniform) { | 425 if (usingBindUniform) { |
426 this->bindUniformLocations(programID); | 426 this->bindUniformLocations(programID); |
427 } | 427 } |
428 fFS.bindFragmentShaderLocations(programID); | 428 fFS.bindFragmentShaderLocations(programID); |
429 GL_CALL(LinkProgram(programID)); | 429 GL_CALL(LinkProgram(programID)); |
430 | 430 |
431 // Calling GetProgramiv is expensive in Chromium. Assume success in release
builds. | 431 // Calling GetProgramiv is expensive in Chromium. Assume success in release
builds. |
432 bool checkLinked = !fGpu->ctxInfo().isChromium(); | 432 bool checkLinked = kChromium_GrGLDriver != fGpu->ctxInfo().driver(); |
433 #ifdef SK_DEBUG | 433 #ifdef SK_DEBUG |
434 checkLinked = true; | 434 checkLinked = true; |
435 #endif | 435 #endif |
436 if (checkLinked) { | 436 if (checkLinked) { |
437 checkLinkStatus(programID); | 437 checkLinkStatus(programID); |
438 } | 438 } |
439 if (!usingBindUniform) { | 439 if (!usingBindUniform) { |
440 this->resolveUniformLocations(programID); | 440 this->resolveUniformLocations(programID); |
441 } | 441 } |
442 | 442 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 } | 502 } |
503 | 503 |
504 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 504 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
505 | 505 |
506 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 506 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
507 int numProcs = fProcs.count(); | 507 int numProcs = fProcs.count(); |
508 for (int e = 0; e < numProcs; ++e) { | 508 for (int e = 0; e < numProcs; ++e) { |
509 SkDELETE(fProcs[e]); | 509 SkDELETE(fProcs[e]); |
510 } | 510 } |
511 } | 511 } |
OLD | NEW |