Update gpu trace marker system for MultiDrawBuffer world
The main thrust of this CL is to remove the currCmdMarker variable from GrTargetCommands::flush. In a MultiDrawBuffer world the Cmds need not be execute in the order of their issuance.
Review URL: https://codereview.chromium.org/978363002
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 24db2e0..2584635 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -395,9 +395,9 @@
const GrTraceMarkerSet& activeTraceMarkers = this->getActiveTraceMarkers();
if (activeTraceMarkers.count() > 0) {
if (cmd->isTraced()) {
- fGpuCmdMarkers.back().addSet(activeTraceMarkers);
+ fGpuCmdMarkers[cmd->markerID()].addSet(activeTraceMarkers);
} else {
- cmd->makeTraced();
+ cmd->setMarkerID(fGpuCmdMarkers.count());
fGpuCmdMarkers.push_back(activeTraceMarkers);
}
}