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

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

Issue 943453002: Avoid wrong memory access due to double substitution and %% (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrGLGpu.cpp ('k') | src/gpu/gl/builders/GrGLShaderStringBuilder.cpp » ('j') | 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 "gl/GrGLGeometryProcessor.h" 10 #include "gl/GrGLGeometryProcessor.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/builders/GrGLShaderStringBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698