From 664cb9ebe54f810754197e04af8459ba33fa7893 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Fri, 20 Mar 2020 12:35:50 -0600 Subject: [PATCH] Call incNumDraws() after all draw calls in mtl Change-Id: I4f97a86a168daa623185931c289f3dc40fdc3d91 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278264 Reviewed-by: Jim Van Verth Commit-Queue: Chris Dalton --- src/gpu/mtl/GrMtlOpsRenderPass.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gpu/mtl/GrMtlOpsRenderPass.mm b/src/gpu/mtl/GrMtlOpsRenderPass.mm index 31aa654caf..d6168da7e1 100644 --- a/src/gpu/mtl/GrMtlOpsRenderPass.mm +++ b/src/gpu/mtl/GrMtlOpsRenderPass.mm @@ -277,6 +277,7 @@ void GrMtlOpsRenderPass::onDraw(int vertexCount, int baseVertex) { [fActiveRenderCmdEncoder drawPrimitives:fActivePrimitiveType vertexStart:baseVertex vertexCount:vertexCount]; + fGpu->stats()->incNumDraws(); } void GrMtlOpsRenderPass::onDrawIndexed(int indexCount, int baseIndex, uint16_t minIndexValue, @@ -312,6 +313,7 @@ void GrMtlOpsRenderPass::onDrawInstanced(int instanceCount, int baseInstance, in } else { SkASSERT(false); } + fGpu->stats()->incNumDraws(); } void GrMtlOpsRenderPass::onDrawIndexedInstanced(