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>