On Wed, 2 Sep 2015 13:38:50 -0500 Prabhu S <[email protected]> wrote:
> With the below change in simple-shm.c, weston+fbdev backend will be stuck > and other compositors may work. It depends on compositor implementation and > the actual behavior supposed to be is not clearly defined. I'm still trying > to identify fix in weston, it looks like state information is overwritten > before idle_repaint is being called. > > window->callback = wl_surface_frame(window->surface); > wl_callback_add_listener(window->callback, &frame_listener, window); > wl_surface_commit(window->surface); > > + wl_surface_attach(window->surface, 0, 0, 0); > +wl_surface_damage(window->surface, > 0, 0, 0, 0); > + wl_surface_commit(window->surface); > I think this is even worse than compositor-dependent. I think this is a race, which you usually win or lose based on how the compositor works, but never guarantees that you always win or lose. I bet the behaviour you see will differ also depending on whether there are other apps updating. The race here is, that you do not know if the compositor has time to display the first buffer before you replace it with the NULL buffer. If you waited for the frame callback *before* committing the NULL buffer, things would be race-free. However, pay attention to Jasper's comments too. On the first commit you ask for a frame callback. If you then do another commit, it is like saying "I do not care about the old frame callback anymore, I am committing now instead." In that case you should just destroy the wl_callback object from before and be done with it. Obviously you cannot go and destroy the wl_callback EGL internally uses. It is best to not commit buffers manually to a wl_surface you are also updating with eglSwapBuffers(). I do not think there is anything to fix in Weston in this respect. Thanks, pq
pgpdD4X8wsYS3.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
