platform_android: prevent deadlock in droid_swap_buffers
authorHaixia Shi <hshi@chromium.org>
Thu, 2 Jun 2016 19:48:23 +0000 (12:48 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 7 Jun 2016 11:30:25 +0000 (12:30 +0100)
commit1ea233c6f30a74e6ff5456c3521328237b01eed8
tree702cc07b3964c51679f0608a90610973a97ea85d
parentb7f7ec78435771ab02f7d9a61bb1d4a11df720b8
platform_android: prevent deadlock in droid_swap_buffers

To avoid blocking other EGL calls, release the display mutex before
we enqueue buffer to android frameworks and re-acquire the mutex
upon return.

v2: moved lock/unlock inside droid_window_enqueue_buffer().

TEST=verify pinch zoom in Photos app no longer causes hangs

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/platform_android.c