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

Side by Side Diff: src/gpu/gl/debug/GrGLCreateDebugInterface.cpp

Issue 1514033002: Initialize glGen* call id args to zero (Closed) Base URL: https://skia.googlesource.com/skia.git@run-debug-context
Patch Set: Created 5 years 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') | tests/TessellatingPathRendererTests.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "gl/GrGLInterface.h" 10 #include "gl/GrGLInterface.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } else { 506 } else {
507 shader->deleteAction(); 507 shader->deleteAction();
508 } 508 }
509 } 509 }
510 510
511 GrGLvoid debugGenObjs(GrDebugGL::GrObjTypes type, 511 GrGLvoid debugGenObjs(GrDebugGL::GrObjTypes type,
512 GrGLsizei n, 512 GrGLsizei n,
513 GrGLuint* ids) { 513 GrGLuint* ids) {
514 514
515 for (int i = 0; i < n; ++i) { 515 for (int i = 0; i < n; ++i) {
516 GrFakeRefObj *obj = GrDebugGL::getInstance()->createObj(type); 516 GrAlwaysAssert(ids[i] == 0);
517 GrAlwaysAssert(obj); 517 GrFakeRefObj *obj = GrDebugGL::getInstance()->createObj(type);
518 ids[i] = obj->getID(); 518 GrAlwaysAssert(obj);
519 ids[i] = obj->getID();
519 } 520 }
520 } 521 }
521 522
522 GrGLvoid GR_GL_FUNCTION_TYPE debugGLGenBuffers(GrGLsizei n, GrGLuint* ids) { 523 GrGLvoid GR_GL_FUNCTION_TYPE debugGLGenBuffers(GrGLsizei n, GrGLuint* ids) {
523 debugGenObjs(GrDebugGL::kBuffer_ObjTypes, n, ids); 524 debugGenObjs(GrDebugGL::kBuffer_ObjTypes, n, ids);
524 } 525 }
525 526
526 GrGLvoid GR_GL_FUNCTION_TYPE debugGLGenerateMipmap(GrGLenum level) { 527 GrGLvoid GR_GL_FUNCTION_TYPE debugGLGenerateMipmap(GrGLenum level) {
527 } 528 }
528 529
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity; 981 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity;
981 982
982 functions->fBindFragDataLocationIndexed = 983 functions->fBindFragDataLocationIndexed =
983 noOpGLBindFragDataLocationIndexed; 984 noOpGLBindFragDataLocationIndexed;
984 985
985 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio ns->fGetStringi, 986 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio ns->fGetStringi,
986 functions->fGetIntegerv, nullptr, GR_EGL_NO_DISP LAY); 987 functions->fGetIntegerv, nullptr, GR_EGL_NO_DISP LAY);
987 988
988 return interface; 989 return interface;
989 } 990 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698