On Mon, 14 Jan 2019 at 18:20, Emil Velikov <emil.l.veli...@gmail.com> wrote: > > 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.timofej...@imgtec.com> > > Reviewed-by: Eric Engestrom <eric.engest...@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. > Right, _eglLog is being used... silly me. I've got confused by the mention of getenv and expensive. Currently the getenv() call is a once-off thing.
I'd imagine when this work originates, when that wasn't the case. Hence we no longer need this micro optimisation? -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev