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

Side by Side Diff: src/gpu/instanced/GLInstancedRendering.cpp

Issue 2358843002: Conditionally insert gl_PointSize into shaders. (Closed)
Patch Set: minor Created 4 years, 3 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/glsl/GrGLSLVertexShaderBuilder.cpp ('k') | src/gpu/vk/GrVkPipelineState.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 2016 Google Inc. 2 * Copyright 2016 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 "GLInstancedRendering.h" 8 #include "GLInstancedRendering.h"
9 9
10 #include "GrResourceProvider.h" 10 #include "GrResourceProvider.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 SkASSERT(glInstancesIdx == numGLInstances); 198 SkASSERT(glInstancesIdx == numGLInstances);
199 fInstanceBuffer->unmap(); 199 fInstanceBuffer->unmap();
200 } 200 }
201 201
202 void GLInstancedRendering::onDraw(const GrPipeline& pipeline, const InstanceProc essor& instProc, 202 void GLInstancedRendering::onDraw(const GrPipeline& pipeline, const InstanceProc essor& instProc,
203 const Batch* baseBatch) { 203 const Batch* baseBatch) {
204 if (!fDrawIndirectBuffer && !fGLDrawCmdsInfo) { 204 if (!fDrawIndirectBuffer && !fGLDrawCmdsInfo) {
205 return; // beginFlush was not successful. 205 return; // beginFlush was not successful.
206 } 206 }
207 if (!this->glGpu()->flushGLState(pipeline, instProc)) { 207 if (!this->glGpu()->flushGLState(pipeline, instProc, false)) {
208 return; 208 return;
209 } 209 }
210 210
211 if (fDrawIndirectBuffer) { 211 if (fDrawIndirectBuffer) {
212 this->glGpu()->bindBuffer(kDrawIndirect_GrBufferType, fDrawIndirectBuffe r.get()); 212 this->glGpu()->bindBuffer(kDrawIndirect_GrBufferType, fDrawIndirectBuffe r.get());
213 } 213 }
214 214
215 const GrGLCaps& glCaps = this->glGpu()->glCaps(); 215 const GrGLCaps& glCaps = this->glGpu()->glCaps();
216 const GLBatch* batch = static_cast<const GLBatch*>(baseBatch); 216 const GLBatch* batch = static_cast<const GLBatch*>(baseBatch);
217 int numCommands = batch->numGLCommands(); 217 int numCommands = batch->numGLCommands();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 GL_CALL(DeleteVertexArrays(1, &fVertexArrayID)); 315 GL_CALL(DeleteVertexArrays(1, &fVertexArrayID));
316 this->glGpu()->notifyVertexArrayDelete(fVertexArrayID); 316 this->glGpu()->notifyVertexArrayDelete(fVertexArrayID);
317 } 317 }
318 fVertexArrayID = 0; 318 fVertexArrayID = 0;
319 fInstanceBuffer.reset(); 319 fInstanceBuffer.reset();
320 fDrawIndirectBuffer.reset(); 320 fDrawIndirectBuffer.reset();
321 fInstanceAttribsBufferUniqueId = SK_InvalidUniqueID; 321 fInstanceAttribsBufferUniqueId = SK_InvalidUniqueID;
322 } 322 }
323 323
324 } 324 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698