From d14101e835846ae596ae46ffe4d5a6bbe6c55eff Mon Sep 17 00:00:00 2001 From: robertphillips Date: Thu, 5 Mar 2015 08:55:28 -0800 Subject: [PATCH] Fix GPU trace marker bug Without this patch the GPU trace markers can be potentially unbalanced when batching occurs. Review URL: https://codereview.chromium.org/981973002 --- src/gpu/GrTargetCommands.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gpu/GrTargetCommands.cpp b/src/gpu/GrTargetCommands.cpp index d326226d1f..30920f884d 100644 --- a/src/gpu/GrTargetCommands.cpp +++ b/src/gpu/GrTargetCommands.cpp @@ -319,6 +319,10 @@ void GrTargetCommands::flush(GrInOrderDrawBuffer* iodb) { if (Cmd::kDrawBatch_Cmd == iter->type()) { DrawBatch* db = reinterpret_cast(iter.get()); fBatchTarget.flushNext(db->fBatch->numberOfDraws()); + + if (iter->isTraced()) { + gpu->removeGpuTraceMarker(&newMarker); + } continue; } -- 2.34.1