On 30 May 2013 15:57, Chad Versace <[email protected]> wrote:

> The nasty spin consumed 100% cpu when tests were ran in non-auto mode.
> No behavioral change when running tests in auto mode.
>
> This patch is semantically equivalent to:
>     while (true) {
> -       if (!XPending(dpy))
> -           continue;
>         XNextEvent(dpy, &event);
>         handle_event(event);
>     }
>

Reviewed-by: Paul Berry <[email protected]>


>
> CC: Eric Anholt <[email protected]>
> CC: Paul Berry <[email protected]>
> Signed-off-by: Chad Versace <[email protected]>
> ---
>  tests/util/piglit-framework-gl/piglit_x11_framework.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/tests/util/piglit-framework-gl/piglit_x11_framework.c
> b/tests/util/piglit-framework-gl/piglit_x11_framework.c
> index dafd370..e4bf9b9 100644
> --- a/tests/util/piglit-framework-gl/piglit_x11_framework.c
> +++ b/tests/util/piglit-framework-gl/piglit_x11_framework.c
> @@ -80,9 +80,6 @@ process_next_event(struct piglit_x11_framework *x11_fw)
>         Display *dpy = x11_fw->display;
>         XEvent event;
>
> -       if (!XPending(dpy))
> -               return;
> -
>         XNextEvent(dpy, &event);
>
>         switch (event.type) {
> --
> 1.8.1.4
>
>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to