[Piglit] [PATCH 2/3] util/x11: Wait for expose event in manual mode or with front buffer tests.

Eric Anholt eric at anholt.net
Tue Jun 4 11:25:26 PDT 2013


Paul Berry <stereotype441 at gmail.com> writes:

> When running piglit in manual mode (no "-auto" command-line option is
> given), there's no point in calling piglit_display() before the window
> is exposed.  This just leads to confusion because it will be called
> again once the window appears, leading to duplicate test output in the
> console window.
>
> When running piglit in "-auto" mode, if the test accesses the front
> buffer, then we need to wait until the window is exposed before
> calling piglit_display(), since a front buffer is not guaranteed to be
> available before then (in practice, this only happens with
> non-compositing window managers).  However, if the test doesn't access
> the front buffer, then it is still safe to call piglit_display()
> before the expose event; doing so avoids wasting time.

I've been trying to decide whether I prefer "be a little more efficient
and skip waiting for the event when we don't need it" like this commit,
or "always wait for the event for sanity".  Since I don't seem to have a
strong preference, patches 1 and 2 are:

Reveiwed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130604/31a518f0/attachment.pgp>


More information about the Piglit mailing list