why wi_surface_frame callback delay two frames

Pekka Paalanen ppaalanen at gmail.com
Tue May 5 01:23:29 PDT 2015


On Tue, 5 May 2015 06:53:44 +0000
Nancy Zou <Nancy.Zou at csr.com> wrote:

> Hi all
> 
> My wayland/Weston version is 1.5.0.
> 
> I use wl_surface_frame to listen the frame done callback info. I get the frame 0 callback when the frame 2 is drawing. If I wait for frame 0 callback when drawing frame 1, the program is in dead loop.
> 
> Does this result is right? Is there any problem in my program? Thank you.

Hi,

how do you differ from the main loops and event handlers in Weston's
simple-shm.c or simple-egl.c?

Are you using EGL? Which implementation of EGL?

Is your main loop flushing and waiting properly? For the simple case,
see simple-shm.c. For more complicated case, see
http://wayland.freedesktop.org/docs/html/apb.html#Client-classwl__display
and wl_display_prepare_read() and wl_display_read_events().

If it is not a deadlock but just a timing issue, see:
http://ppaalanen.blogspot.fi/2015/02/weston-repaint-scheduling.html


Thanks,
pq


More information about the wayland-devel mailing list