summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2015-01-26 18:19:05 +0800
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-08-21 15:22:03 +0300
commitdecc965be93b25ce2025a125a9d437269cbf0a0e (patch)
tree3f68d5d2d9022c6cbbe0f0e653249eb79d3786e3 /clients
parent1a912a9fe333f0b4cd99aab22fc7528e2c0dc91d (diff)
downloadweston-decc965be93b25ce2025a125a9d437269cbf0a0e.tar.gz
clients: Drop deadlock circumvention hack now that we don't need it
mesa supports EGLSwapInterval 0 now, so lets remove this hack. As a bonus we don't conflict with the XDG shell protocol that doesn't allow committing a null-buffer, which was a side effect of this hack. This patch reverts e9297f8e7ee09fa39b1d4293fad6e97705ccff21. See that commit for an explanation how this worked. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> [Pekka: added reference to the original commit] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/clients/window.c b/clients/window.c
index 6b34bfb2..0e73f5bd 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -3911,36 +3911,6 @@ surface_resize(struct surface *surface)
}
static void
-hack_prevent_EGL_sub_surface_deadlock(struct window *window)
-{
- /*
- * This hack should be removed, when EGL respects
- * eglSwapInterval(0).
- *
- * If this window has sub-surfaces, especially a free-running
- * EGL-widget, we need to post the parent surface once with
- * all the old state to guarantee, that the EGL-widget will
- * receive its frame callback soon. Otherwise, a forced call
- * to eglSwapBuffers may end up blocking, waiting for a frame
- * event that will never come, because we will commit the parent
- * surface with all new state only after eglSwapBuffers returns.
- *
- * This assumes, that:
- * 1. When the EGL widget's resize hook is called, it pauses.
- * 2. When the EGL widget's redraw hook is called, it forces a
- * repaint and a call to eglSwapBuffers(), and maybe resumes.
- * In a single threaded application condition 1 is a no-op.
- *
- * XXX: This should actually be after the surface_resize() calls,
- * but cannot, because then it would commit the incomplete state
- * accumulated from the widget resize hooks.
- */
- if (window->subsurface_list.next != &window->main_surface->link ||
- window->subsurface_list.prev != &window->main_surface->link)
- wl_surface_commit(window->main_surface->surface);
-}
-
-static void
window_do_resize(struct window *window)
{
struct surface *surface;
@@ -3982,8 +3952,6 @@ idle_resize(struct window *window)
window->pending_allocation.width,
window->pending_allocation.height);
- hack_prevent_EGL_sub_surface_deadlock(window);
-
window_do_resize(window);
}