wayland-egl-tizen: Added new API to create render sync fd. 47/219547/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Mon, 11 Nov 2019 04:32:48 +0000 (13:32 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Fri, 6 Dec 2019 01:55:18 +0000 (10:55 +0900)
commitf05d29898d4ef28372a701b7f464c1d6e6c70c45
treece8a8f6630a527713537dbd6a10bd6a339a00b17
parent1d38c642bbc5d42ff5d987aad1b01a7ed136f317
wayland-egl-tizen: Added new API to create render sync fd.

 New API
 wl_egl_window_tizen_get_render_sync_fd(struct wl_egl_window*)

 /**
 * Create a sync fence fd that can tell render done.
 *
 * If eglSwapBuffers works async, it returns fd which tells
 * when the render job is finished.
 * This fd can wait asynchronously via poll or select.
 *
 * Important *
 * This requires the following premise:
 *  - After ddk calls libplpl-egl's tpl_surface_dequeue_buffer to get the buffer,
 *   and until it calls tpl_surface_enqueue_buffer,
 *  it is called the gpu rendering job interval.
 *  - Therefore, when using the dma_buf implicit fence,
 *   there is no guarantee that the rendering job is finished
 *   with the fence obtained through this API.
 *
 * The fence_fd obtained through this function is one-time available,
 * can not be reused, so caller must close it when finished using it.
 *
 * @param egl_window handle to wl_egl_window.
 * @return sync fd on success, -1 on failure.
 */

Change-Id: Ia19f88108cfe8d0e5e6477acbd83a2df173f5507
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/wayland-egl-tizen/wayland-egl-tizen-priv.h
src/wayland-egl-tizen/wayland-egl-tizen.c
src/wayland-egl-tizen/wayland-egl-tizen.h