From b3fd0b379585a7b095fa0edbf01554bdc5ce48a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 1 Apr 2021 12:33:00 +0200 Subject: [PATCH] GL: adapt OpenGLTester to changes in TestSuite. --- src/Magnum/GL/OpenGLTester.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/OpenGLTester.cpp b/src/Magnum/GL/OpenGLTester.cpp index e14b2ecc3..b872115c5 100644 --- a/src/Magnum/GL/OpenGLTester.cpp +++ b/src/Magnum/GL/OpenGLTester.cpp @@ -44,17 +44,25 @@ void OpenGLTester::gpuTimeBenchmarkBegin() { /* Initialize, if not already; check for extension presence and skip if not available. This function is always called from inside CORRADE_BENCHMARK, - which does the test case registration on a proper function. */ + which does the test case registration on a proper function, thus we + don't need to use the CORRADE_SKIP() macro, which avoids some + unnecessary work. */ if(!_gpuTimeQuery.id()) { #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) - skip("GL_ARB_timer_query is not supported"); + skip([](Debug&& debug) { + debug << "GL_ARB_timer_query is not supported"; + }); #elif defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) if(!Context::current().isExtensionSupported()) - skip("GL_EXT_disjoint_timer_query_webgl2 is not supported"); + skip([](Debug&& debug) { + debug << "GL_EXT_disjoint_timer_query_webgl2 is not supported"; + }); #else if(!Context::current().isExtensionSupported()) - skip("GL_EXT_disjoint_timer_query is not supported"); + skip([](Debug&& debug) { + debug << "GL_EXT_disjoint_timer_query is not supported"; + }); #endif _gpuTimeQuery = TimeQuery{TimeQuery::Target::TimeElapsed}; }