[Mesa-dev] [PATCH v3 2/3] egl: introduce a log level getter function
Emil Velikov
emil.l.velikov at gmail.com
Mon Jan 14 18:16:42 UTC 2019
On 2019/01/11, Silvestrs Timofejevs wrote:
> Being able to retrieve the log level can be useful to enable/disable
> debug code. The alternative, which is calling 'getenv' function every
> time to retrieve the log level, is more "expensive".
>
> Signed-off-by: Silvestrs Timofejevs <silvestrs.timofejevs at imgtec.com>
> Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
> src/egl/main/egllog.c | 9 +++++++++
> src/egl/main/egllog.h | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c
> index c223f49..42bae01 100644
> --- a/src/egl/main/egllog.c
> +++ b/src/egl/main/egllog.c
> @@ -133,6 +133,15 @@ _eglInitLogger(void)
> }
> }
>
> +/**
> + * Return the log level.
> + */
> +EGLint
> +_eglGetLogLevel(void)
> +{
> + return logging.level;
> +}
> +
Any particular reason why are not using _eglLog()? It does not log level
and VA handling for us.
-Emil
More information about the mesa-dev
mailing list