[Mesa-dev] gallium/hud: control visibility at startup and runtime.

Emil Velikov emil.l.velikov at gmail.com
Tue Nov 3 08:23:30 PST 2015


Hello Jimmy,

Please add your name to your git config.

On 3 November 2015 at 10:43, boombatower <jimmy at boombatower.com> wrote:
> - env GALLIUM_HUD_VISIBLE: control default visibility
> - env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal
> ---
>  docs/envvars.html                       |  6 ++++++
>  src/gallium/auxiliary/hud/hud_context.c | 23 +++++++++++++++++++++++
>  2 files changed, 29 insertions(+)
>
> diff --git a/docs/envvars.html b/docs/envvars.html
> index bdfe999..530bbb7 100644
> --- a/docs/envvars.html
> +++ b/docs/envvars.html
> @@ -179,6 +179,12 @@ Mesa EGL supports different sets of environment variables.  See the
>  <li>GALLIUM_HUD - draws various information on the screen, like framerate,
>      cpu load, driver statistics, performance counters, etc.
>      Set GALLIUM_HUD=help and run e.g. glxgears for more info.
> +<li>GALLIUM_HUD_VISIBLE - control default visibility, defaults to true.
> +<li>GALLIUM_HUD_TOGGLE_SIGNAL - toggle visibility via user specified signal.
> +    Especially useful to toggle hud at specific points of application and
> +    disable for unencumbered viewing the rest of the time. For example, set
> +    GALLIUM_HUD_VISIBLE to false and GALLIUM_HUD_SIGNAL_TOGGLE to 10 (SIGUSR1).
> +    Use kill -10 <pid> to toggle the hud as desired.
A couple of open questions:

Wouldn't it be better to hardcode the signal to SIGUSR1 (otherwise one
can attempt to use SIGKILL/TERM/other funny cases) for now ?
Additionally dropping the GALLIUM_HUD_VISIBLE will eliminate some of
the issues pointed out so far. One can easily toggle off as the
application is up.

Regards,
Emil


More information about the mesa-dev mailing list