weston/clients
Pekka Paalanen e9297f8e7e window: prevent EGL sub-surface deadlock
Mesa's eglSwapBuffers() waits for the frame event from the previous
swapBuffers, before it returns. Apparently eglSwapInterval(), which
should be able to disable the wait, is unimplemented for now.

When a sub-surface contains an EGL widget, and the commit mode is
synchronized, the frame events will not be delivered to EGL until the
parent surface gets committed. Therefore rendering the EGL widget twice
would lead to a deadlock.

When the window is being resized, we need to force a repaint of the EGL
widget, too, to make the whole window consistent. For that, we need to
make sure the frame event from the previous eglSwapBuffers() actually
arrives.

This patch adds an extra wl_surface.commit(parent), when the window is
being resized, which should guarantee, that the previous eglSwapBuffers
gets its event.

To properly handle an EGL widget in a sub-surface, running in its own
thread, the EGL widget's automatic updates should be paused before
sending the extra wl_surface.commit(parent). A natural place for the
pause would be in the widget's resize hook. However, wl_surface.commit
cannot be called right after resize hooks, because it would commit new,
incomplete surface state. Therefore this patch is not enough for
threaded toytoolkit applications.  Luckily those do not exist yet.

When eglSwapInterval() gets implemented, this patch should be reverted.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:35:54 -04:00
..
.gitignore clients: add subsurfaces demo 2013-05-10 14:35:53 -04:00
calibrator.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
clickdot.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
cliptest.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
desktop-shell.c desktop-shell: better error logging 2013-04-15 20:57:55 -04:00
dnd.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
editor.c editor: Removed unused utf8_characters() function 2013-05-10 12:51:08 -04:00
eventdemo.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
flower.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
gears.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
glmatrix.c Add signedness warning flag and fix fallout 2012-03-30 11:52:39 -04:00
image.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
keyboard.c keyboard: Fix offsets when deleting text 2013-05-06 20:26:20 -04:00
Makefile.am clients: add subsurfaces demo 2013-05-10 14:35:53 -04:00
matrix3.xpm clients: import glmatrix.c and matrix3.xpm 2011-11-18 14:45:04 +02:00
resizor.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
screenshot.c screenshot: Print warning if we're not launched from weston 2013-02-13 13:41:07 -05:00
simple-egl.c simple-egl: Add support for EGL_EXT_swap_buffer_with_damage 2013-05-08 11:39:59 -04:00
simple-shm.c compositor: Only send release event in response to wl_surface.attach 2013-03-05 15:35:47 -05:00
simple-touch.c clients: add global_remove handler stubs 2013-01-24 16:42:38 -05:00
smoke.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
subsurfaces.c clients: add subsurfaces demo 2013-05-10 14:35:53 -04:00
tablet-shell.c clients: tablet-shell: Wait for set_homescreen hits the server 2013-04-09 15:05:32 -04:00
terminal.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
transformed.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
view.c view: g_type_init() is deprecated in glib >= 2.35 2013-05-02 16:22:27 -04:00
weston-info.c clients: add global_remove handler stubs 2013-01-24 16:42:38 -05:00
weston-simple-im.c text: Rename input_method to wl_input_method 2013-05-02 17:18:46 -04:00
window.c window: prevent EGL sub-surface deadlock 2013-05-10 14:35:54 -04:00
window.h clients: add subsurfaces demo 2013-05-10 14:35:53 -04:00
wscreensaver-glue.c screensaver: fix decoding of transparency in xpm files 2012-09-06 21:08:12 -04:00
wscreensaver-glue.h Never include wayland-util.h directly 2011-11-22 09:35:14 -05:00
wscreensaver.c Pass argc pointer to parse_options() 2013-02-20 15:27:49 -05:00
wscreensaver.h Add signedness warning flag and fix fallout 2012-03-30 11:52:39 -04:00