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

Side by Side Diff: src/gpu/gl/GrGLGpu.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/GrTest.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 GL_CALL_RET(renderer, GetString(GR_GL_RENDERER)); 134 GL_CALL_RET(renderer, GetString(GR_GL_RENDERER));
135 GL_CALL_RET(version, GetString(GR_GL_VERSION)); 135 GL_CALL_RET(version, GetString(GR_GL_VERSION));
136 SkDebugf("------------------------- create GrGLGpu %p --------------\n", 136 SkDebugf("------------------------- create GrGLGpu %p --------------\n",
137 this); 137 this);
138 SkDebugf("------ VENDOR %s\n", vendor); 138 SkDebugf("------ VENDOR %s\n", vendor);
139 SkDebugf("------ RENDERER %s\n", renderer); 139 SkDebugf("------ RENDERER %s\n", renderer);
140 SkDebugf("------ VERSION %s\n", version); 140 SkDebugf("------ VERSION %s\n", version);
141 SkDebugf("------ EXTENSIONS\n"); 141 SkDebugf("------ EXTENSIONS\n");
142 ctx.extensions().print(); 142 ctx.extensions().print();
143 SkDebugf("\n"); 143 SkDebugf("\n");
144 SkDebugf(this->glCaps().dump().c_str()); 144 SkDebugf("%s", this->glCaps().dump().c_str());
145 } 145 }
146 146
147 fProgramCache = SkNEW_ARGS(ProgramCache, (this)); 147 fProgramCache = SkNEW_ARGS(ProgramCache, (this));
148 148
149 SkASSERT(this->glCaps().maxVertexAttributes() >= GrGeometryProcessor::kMaxVe rtexAttribs); 149 SkASSERT(this->glCaps().maxVertexAttributes() >= GrGeometryProcessor::kMaxVe rtexAttribs);
150 150
151 fLastSuccessfulStencilFmtIdx = 0; 151 fLastSuccessfulStencilFmtIdx = 0;
152 fHWProgramID = 0; 152 fHWProgramID = 0;
153 fTempSrcFBOID = 0; 153 fTempSrcFBOID = 0;
154 fTempDstFBOID = 0; 154 fTempDstFBOID = 0;
(...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 this->setVertexArrayID(gpu, 0); 2763 this->setVertexArrayID(gpu, 0);
2764 } 2764 }
2765 int attrCount = gpu->glCaps().maxVertexAttributes(); 2765 int attrCount = gpu->glCaps().maxVertexAttributes();
2766 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2766 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2767 fDefaultVertexArrayAttribState.resize(attrCount); 2767 fDefaultVertexArrayAttribState.resize(attrCount);
2768 } 2768 }
2769 attribState = &fDefaultVertexArrayAttribState; 2769 attribState = &fDefaultVertexArrayAttribState;
2770 } 2770 }
2771 return attribState; 2771 return attribState;
2772 } 2772 }
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698