From 691ca11b5a820deb3305b297b2a795c7224e2b51 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Sun, 28 Nov 2021 23:04:41 +0100 Subject: [PATCH] DRAW_PANEL_GAL: add profiling counter for OGL buffer swap --- common/gal/opengl/opengl_gal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index d5d71bf071..e88a17145a 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -580,7 +580,7 @@ void OPENGL_GAL::EndDrawing() PROF_COUNTER cntEndNoncached("gl-end-noncached"); PROF_COUNTER cntEndOverlay("gl-end-overlay"); PROF_COUNTER cntComposite("gl-composite"); - PROF_COUNTER cntSwap("gl-composite"); + PROF_COUNTER cntSwap("gl-swap"); cntTotal.Start(); // Cached & non-cached containers are rendered to the same buffer @@ -615,6 +615,8 @@ void OPENGL_GAL::EndDrawing() m_compositor->Present(); blitCursor(); + cntComposite.Stop(); + cntSwap.Start(); SwapBuffers(); cntSwap.Stop();