From 1aab6f80020300c76fe4a15e7f897127aba83586 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 22 Jul 2024 10:16:02 -0700 Subject: [PATCH] [Impeller] Remove implicit calls to glGetError in opt modes. (#54016) This many explicit calls are all but useless unless you are doing bringup. And we do that in unopt modes anyway. Having this on in even the debug and profile opt modes was turning out to be pretty egregious. --- impeller/renderer/backend/gles/proc_table_gles.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/impeller/renderer/backend/gles/proc_table_gles.h b/impeller/renderer/backend/gles/proc_table_gles.h index ec0f46a23fdc0..b440f5a73e9f7 100644 --- a/impeller/renderer/backend/gles/proc_table_gles.h +++ b/impeller/renderer/backend/gles/proc_table_gles.h @@ -74,14 +74,14 @@ struct GLProc { /// template auto operator()(Args&&... args) const { -#ifdef IMPELLER_DEBUG +#if defined(IMPELLER_DEBUG) && !defined(NDEBUG) AutoErrorCheck error(error_fn, name); // We check for the existence of extensions, and reset the function pointer // but it's still called unconditionally below, and will segfault. This // validation log will at least give us a hint as to what's going on. FML_CHECK(IsAvailable()) << "GL function " << name << " is not available. " << "This is likely due to a missing extension."; -#endif // IMPELLER_DEBUG +#endif // defined(IMPELLER_DEBUG) && !defined(NDEBUG) return function(std::forward(args)...); }