OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |