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 #include "gl/GrGLProgram.h" | 9 #include "gl/GrGLProgram.h" |
10 #include "gl/GrGLSLPrettyPrint.h" | 10 #include "gl/GrGLSLPrettyPrint.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 GL_CALL(GetProgramiv(programID, GR_GL_INFO_LOG_LENGTH, &infoLen)); | 470 GL_CALL(GetProgramiv(programID, GR_GL_INFO_LOG_LENGTH, &infoLen)); |
471 SkAutoMalloc log(sizeof(char)*(infoLen+1)); // outside if for debugger | 471 SkAutoMalloc log(sizeof(char)*(infoLen+1)); // outside if for debugger |
472 if (infoLen > 0) { | 472 if (infoLen > 0) { |
473 // retrieve length even though we don't need it to workaround | 473 // retrieve length even though we don't need it to workaround |
474 // bug in chrome cmd buffer param validation. | 474 // bug in chrome cmd buffer param validation. |
475 GrGLsizei length = GR_GL_INIT_ZERO; | 475 GrGLsizei length = GR_GL_INIT_ZERO; |
476 GL_CALL(GetProgramInfoLog(programID, | 476 GL_CALL(GetProgramInfoLog(programID, |
477 infoLen+1, | 477 infoLen+1, |
478 &length, | 478 &length, |
479 (char*)log.get())); | 479 (char*)log.get())); |
480 GrPrintf((char*)log.get()); | 480 SkDebugf((char*)log.get()); |
481 } | 481 } |
482 SkDEBUGFAIL("Error linking program"); | 482 SkDEBUGFAIL("Error linking program"); |
483 GL_CALL(DeleteProgram(programID)); | 483 GL_CALL(DeleteProgram(programID)); |
484 programID = 0; | 484 programID = 0; |
485 } | 485 } |
486 return SkToBool(linked); | 486 return SkToBool(linked); |
487 } | 487 } |
488 | 488 |
489 void GrGLProgramBuilder::resolveUniformLocations(GrGLuint programID) { | 489 void GrGLProgramBuilder::resolveUniformLocations(GrGLuint programID) { |
490 int count = fUniforms.count(); | 490 int count = fUniforms.count(); |
(...skipping 20 matching lines...) Expand all Loading... |
511 } | 511 } |
512 | 512 |
513 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 513 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
514 | 514 |
515 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 515 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
516 int numProcs = fProcs.count(); | 516 int numProcs = fProcs.count(); |
517 for (int e = 0; e < numProcs; ++e) { | 517 for (int e = 0; e < numProcs; ++e) { |
518 SkDELETE(fProcs[e]); | 518 SkDELETE(fProcs[e]); |
519 } | 519 } |
520 } | 520 } |
OLD | NEW |