tbm_surface_queue: add tbm_surface_queue_set_alloc_cb2 21/283521/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 28 Oct 2022 07:20:42 +0000 (16:20 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 28 Oct 2022 07:21:26 +0000 (16:21 +0900)
commit70ed536395779e99a3fc46c45798d468fda0e483
tree72061ee62be22c29a6ae3e0853f7815d51d6e844
parent45b7370fb01a3ee58ce7a487befb7fc653ed10b5
tbm_surface_queue: add tbm_surface_queue_set_alloc_cb2

surface queue infomation can be mismatched when tbm_surface_queue_reset and
tbm_surface_queue_can_dequeue_wait_timeout are called in different thread.

1. tbm_surface_queue_can_dequeue_wait_timeout is called in thread1
   and it wait free buffer
2. tbm_surface_queue_reset is called in thread2
3. waiting of thread1 is finished but wayland_tbm create surface with queue_info
4. _handle_tbm_surface_queue_reset_notify is called and queue_info is updated

for resolving this problem, libtbm add queue infomation in alloc callback
and wayland_tbm create surface with argument of alloc callback.

Change-Id: Ie3274ee8380f0073445b7116c5e26cfbe86f60a2
include/tbm_surface_queue.h
src/tbm_surface_queue.c