wl_egl: implement idle_cb that waits for buffers to be finalized 99/304499/2
authorJoonbum Ko <joonbum.ko@samsung.com>
Fri, 12 Jan 2024 08:10:23 +0000 (17:10 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Thu, 18 Jan 2024 07:24:19 +0000 (16:24 +0900)
commit4189cdaceb63ff4a866d59b43eb7508ba4bf4fd4
tree691531d07a4a236e43e925e5e7156c0bcc08fb71
parented272288f29f659a06c1260f1939b8621efd092d
wl_egl: implement idle_cb that waits for buffers to be finalized

 AS-IS
 - The parent thread waits for buffer to be released in
  traversing the buffer list of surface.
 PROBLEMS
 - Whenever a buffer lis is traversed, the thread should be paused,
  but the timeout error is often occured in pausing operation.
 TO-BE
 - Perform the operation of releasing buffer while traversing
  buffer list in __idle_cb_buffers_finalize.
 - __idle_cb_buffers_finalize is called whenever the main loop's idles,
  and not called after all buffers are released.
 - The parent thread sets a timeout (1s) and waits for all buffers
  to be released, and if the timeout error occurs, forcibly releases
  the buffers that were not released just before tbm_queue destroy.

Change-Id: I6a31786dbe5b7340f7b9b8b00741d5fc3009c78b
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c