| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 GL_CALL(GetProgramiv(programID, GR_GL_INFO_LOG_LENGTH, &infoLen)); | 451 GL_CALL(GetProgramiv(programID, GR_GL_INFO_LOG_LENGTH, &infoLen)); |
| 452 SkAutoMalloc log(sizeof(char)*(infoLen+1)); // outside if for debugger | 452 SkAutoMalloc log(sizeof(char)*(infoLen+1)); // outside if for debugger |
| 453 if (infoLen > 0) { | 453 if (infoLen > 0) { |
| 454 // retrieve length even though we don't need it to workaround | 454 // retrieve length even though we don't need it to workaround |
| 455 // bug in chrome cmd buffer param validation. | 455 // bug in chrome cmd buffer param validation. |
| 456 GrGLsizei length = GR_GL_INIT_ZERO; | 456 GrGLsizei length = GR_GL_INIT_ZERO; |
| 457 GL_CALL(GetProgramInfoLog(programID, | 457 GL_CALL(GetProgramInfoLog(programID, |
| 458 infoLen+1, | 458 infoLen+1, |
| 459 &length, | 459 &length, |
| 460 (char*)log.get())); | 460 (char*)log.get())); |
| 461 SkDebugf((char*)log.get()); | 461 SkDebugf("%s", (char*)log.get()); |
| 462 } | 462 } |
| 463 SkDEBUGFAIL("Error linking program"); | 463 SkDEBUGFAIL("Error linking program"); |
| 464 GL_CALL(DeleteProgram(programID)); | 464 GL_CALL(DeleteProgram(programID)); |
| 465 programID = 0; | 465 programID = 0; |
| 466 } | 466 } |
| 467 return SkToBool(linked); | 467 return SkToBool(linked); |
| 468 } | 468 } |
| 469 | 469 |
| 470 void GrGLProgramBuilder::resolveUniformLocations(GrGLuint programID) { | 470 void GrGLProgramBuilder::resolveUniformLocations(GrGLuint programID) { |
| 471 int count = fUniforms.count(); | 471 int count = fUniforms.count(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 492 } | 492 } |
| 493 | 493 |
| 494 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 494 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 495 | 495 |
| 496 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 496 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
| 497 int numProcs = fProcs.count(); | 497 int numProcs = fProcs.count(); |
| 498 for (int e = 0; e < numProcs; ++e) { | 498 for (int e = 0; e < numProcs; ++e) { |
| 499 SkDELETE(fProcs[e]); | 499 SkDELETE(fProcs[e]); |
| 500 } | 500 } |
| 501 } | 501 } |
| OLD | NEW |