<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>><br><br></div>Marek<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 12:38 AM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">To set the graph update rate, in seconds. The default update rate<br>
has also been changed to 1/2 second.<br>
---<br>
src/gallium/auxiliary/hud/hud_context.c | 17 ++++++++++++++++-<br>
1 files changed, 16 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c<br>
index 5722df3..a5145c2 100644<br>
--- a/src/gallium/auxiliary/hud/hud_context.c<br>
+++ b/src/gallium/auxiliary/hud/hud_context.c<br>
@@ -703,12 +703,27 @@ hud_parse_env_var(struct hud_context *hud, const char *env)<br>
struct hud_pane *pane = NULL;<br>
unsigned x = 10, y = 10;<br>
unsigned width = 251, height = 100;<br>
+ unsigned period = 500 * 1000; /* default period (1/2 second) */<br>
+ const char *period_env;<br>
+<br>
+ /*<br>
+ * The GALLIUM_HUD_PERIOD env var sets the graph update rate.<br>
+ * The env var is in seconds (a float).<br>
+ * Zero means update after every frame.<br>
+ */<br>
+ period_env = getenv("GALLIUM_HUD_PERIOD");<br>
+ if (period_env) {<br>
+ float p = atof(period_env);<br>
+ if (p >= 0.0) {<br>
+ period = (unsigned) (p * 1000 * 1000);<br>
+ }<br>
+ }<br>
<br>
while ((num = parse_string(env, name)) != 0) {<br>
env += num;<br>
<br>
if (!pane) {<br>
- pane = hud_pane_create(x, y, x + width, y + height, 40000, 10);<br>
+ pane = hud_pane_create(x, y, x + width, y + height, period, 10);<br>
if (!pane)<br>
return;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.3.4<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>