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

Side by Side Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 1105263002: Remove vertex/index buffer factilities from GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@josh
Patch Set: rebase Created 5 years, 7 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/GrInOrderDrawBuffer.h ('k') | src/gpu/GrOvalRenderer.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 #include "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.h"
9 9
10 #include "GrDefaultGeoProcFactory.h" 10 #include "GrDefaultGeoProcFactory.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 geometry.fHasLocalMatrix = false; 290 geometry.fHasLocalMatrix = false;
291 } 291 }
292 292
293 SkAutoTUnref<GrBatch> batch(RectBatch::Create(geometry)); 293 SkAutoTUnref<GrBatch> batch(RectBatch::Create(geometry));
294 294
295 SkRect bounds = rect; 295 SkRect bounds = rect;
296 viewMatrix.mapRect(&bounds); 296 viewMatrix.mapRect(&bounds);
297 this->drawBatch(pipelineBuilder, batch, &bounds); 297 this->drawBatch(pipelineBuilder, batch, &bounds);
298 } 298 }
299 299
300 void GrInOrderDrawBuffer::onDraw(const GrGeometryProcessor* gp,
301 const DrawInfo& info,
302 const PipelineInfo& pipelineInfo) {
303 GrTargetCommands::Cmd* cmd = fCommands.recordDraw(this, gp, info, pipelineIn fo);
304 this->recordTraceMarkersIfNecessary(cmd);
305 }
306
307 void GrInOrderDrawBuffer::onDrawBatch(GrBatch* batch, 300 void GrInOrderDrawBuffer::onDrawBatch(GrBatch* batch,
308 const PipelineInfo& pipelineInfo) { 301 const PipelineInfo& pipelineInfo) {
309 GrTargetCommands::Cmd* cmd = fCommands.recordDrawBatch(this, batch, pipeline Info); 302 GrTargetCommands::Cmd* cmd = fCommands.recordDrawBatch(this, batch, pipeline Info);
310 this->recordTraceMarkersIfNecessary(cmd); 303 this->recordTraceMarkersIfNecessary(cmd);
311 } 304 }
312 305
313 void GrInOrderDrawBuffer::onStencilPath(const GrPipelineBuilder& pipelineBuilder , 306 void GrInOrderDrawBuffer::onStencilPath(const GrPipelineBuilder& pipelineBuilder ,
314 const GrPathProcessor* pathProc, 307 const GrPathProcessor* pathProc,
315 const GrPath* path, 308 const GrPath* path,
316 const GrScissorState& scissorState, 309 const GrScissorState& scissorState,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); 393 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
401 if (activeTraceMarkers.count() > 0) { 394 if (activeTraceMarkers.count() > 0) {
402 if (cmd->isTraced()) { 395 if (cmd->isTraced()) {
403 fGpuCmdMarkers[cmd->markerID()].addSet(activeTraceMarkers); 396 fGpuCmdMarkers[cmd->markerID()].addSet(activeTraceMarkers);
404 } else { 397 } else {
405 cmd->setMarkerID(fGpuCmdMarkers.count()); 398 cmd->setMarkerID(fGpuCmdMarkers.count());
406 fGpuCmdMarkers.push_back(activeTraceMarkers); 399 fGpuCmdMarkers.push_back(activeTraceMarkers);
407 } 400 }
408 } 401 }
409 } 402 }
410
411 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount,
412 size_t vertexStride,
413 int indexCount) {
414 #ifndef USE_BITMAP_TEXTBLOBS
415 fCommands.closeBatch();
416 #endif
417
418 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i ndexCount);
419 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698