From 082cd6d9010546db99a19692f9daa6cc9abea536 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 15 Feb 2017 17:31:50 +0900 Subject: [PATCH] tpl_wayland_egl: subdivided the reason of failure of tbm_suface_queue_enqueue. - When tbm_surface_queue_enqueue failed although tbm_surface was valid, client is going to do wl_surface_commit forcibly to assure the lastest frame. - In enlightenment(E20) of TIZEN platform, depending on some situation(Activate, Deactivate), the compositor may or may not display the last forcibly commited buffer in this way. In this situation, the compositor's display policy may vary from server to server. - libtbm tbm_surface_queue: Added some enum value for checking detail errors. 0a43ad4cfa6b57b2f33d8fe2f06eb89db8841f58 Change-Id: I2434341d093792112b1b89eefe3d140c5b6a840d Signed-off-by: joonbum.ko --- src/tpl_wayland_egl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index 358432c..4f4ad44 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -869,6 +869,26 @@ __tpl_wayland_egl_surface_enqueue_buffer(tpl_surface_t *surface, */ tbm_surface_internal_unref(tbm_surface); } else { + /* + * If tbm_surface is valid but it is not tracked by tbm_surface_queue, + * tbm_surface_queue_enqueue will return below value. + * TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE + * It means tbm_surface_queue has been reset before client try + * to enqueue this tbm_surface. + * We should commit this buffer to display to assure the latest frame. + * + * In enlightenment(E20) of TIZEN platform, depending on + * some situation(Activate, Deactivate), the compositor may or may not + * display the last forcibly commited buffer in this way. + * + * In this situation, the compositor's display policy may vary from + * server to server. + */ + if (tsq_err == TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE) { + __tpl_wayland_egl_surface_commit(surface, tbm_surface, + num_rects, rects); + return TPL_ERROR_NONE; + } TPL_ERR("Failed to enqeueue tbm_surface(%p). | tsq_err = %d", tbm_surface, tsq_err); -- 2.7.4