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

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

Issue 978363002: Update gpu trace marker system for MultiDrawBuffer world (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 5 years, 9 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 | « no previous file | src/gpu/GrTargetCommands.h » ('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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 return SkToBool(cmd); 388 return SkToBool(cmd);
389 } 389 }
390 390
391 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* c md) { 391 void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* c md) {
392 if (!cmd) { 392 if (!cmd) {
393 return; 393 return;
394 } 394 }
395 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers(); 395 const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
396 if (activeTraceMarkers.count() > 0) { 396 if (activeTraceMarkers.count() > 0) {
397 if (cmd->isTraced()) { 397 if (cmd->isTraced()) {
398 fGpuCmdMarkers.back().addSet(activeTraceMarkers); 398 fGpuCmdMarkers[cmd->markerID()].addSet(activeTraceMarkers);
399 } else { 399 } else {
400 cmd->makeTraced(); 400 cmd->setMarkerID(fGpuCmdMarkers.count());
401 fGpuCmdMarkers.push_back(activeTraceMarkers); 401 fGpuCmdMarkers.push_back(activeTraceMarkers);
402 } 402 }
403 } 403 }
404 } 404 }
405 405
406 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount, 406 void GrInOrderDrawBuffer::willReserveVertexAndIndexSpace(int vertexCount,
407 size_t vertexStride, 407 size_t vertexStride,
408 int indexCount) { 408 int indexCount) {
409 fCommands.closeBatch(); 409 fCommands.closeBatch();
410 410
411 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i ndexCount); 411 this->INHERITED::willReserveVertexAndIndexSpace(vertexCount, vertexStride, i ndexCount);
412 } 412 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698