Hi Haixia Shi,
On 26 May 2016 at 00:02, Haixia Shi <[email protected]> wrote:
> @@ -434,8 +434,15 @@ droid_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp,
> _EGLSurface *draw)
>
> dri2_flush_drawable_for_swapbuffers(disp, draw);
>
> - if (dri2_surf->buffer)
> + if (dri2_surf->buffer) {
> + /* To avoid blocking other EGL calls, release the display mutex before
> + * we enter droid_window_enqueue_buffer() and re-acquire the mutex upon
> + * return.
> + */
> + mtx_unlock(&disp->Mutex);
> droid_window_enqueue_buffer(dri2_surf);
> + mtx_lock(&disp->Mutex);
> + }
>
Shouldn't this be moved to droid_window_enqueue_buffer() ? This way
destroy_surface will also benefit from the non-blocking behaviour.
Related: if the Android API has a method to cancel/discard the actual
buffer we can use that instead for
destroy_surface/droid_window_cancel_buffer.
Regards,
Emil
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev