}
static tbm_surface_h
-__wayland_tbm_client_surface_alloc_cb(tbm_surface_queue_h surface_queue, void *data)
+__wayland_tbm_client_surface_alloc_cb2(tbm_surface_queue_h surface_queue, int width, int height,
+ int format, int flags, void *data)
{
struct wayland_tbm_surface_queue *queue_info =
(struct wayland_tbm_surface_queue *)data;
pthread_mutex_lock(&queue_info->lock);
+ queue_info->width = width;
+ queue_info->height = height;
+ queue_info->format = format;
+ queue_info->flag = flags;
+
if (_wayland_tbm_client_use_attach_bufs(queue_info)) {
surface = _wayland_tbm_client_get_usable_attach_buf(queue_info);
/* ref.. pair of __wayland_tbm_client_surface_free_cb */
if (!surface) {
/* ref.. pair of __wayland_tbm_client_surface_free_cb */
- surface = tbm_surface_internal_create_with_flags(queue_info->width,
- queue_info->height,
- queue_info->format,
- queue_info->flag);
+ surface = tbm_surface_internal_create_with_flags(width,
+ height,
+ format,
+ flags);
WL_TBM_TRACE("surface_queue:%p tbm_surface:%p DEACTIVE",
surface_queue, surface);
width, height, format, 0);
WL_TBM_GOTO_IF_FAIL(queue_info->tbm_queue != NULL, fail);
- tbm_surface_queue_set_alloc_cb(queue_info->tbm_queue,
- __wayland_tbm_client_surface_alloc_cb,
+ tbm_surface_queue_set_alloc_cb2(queue_info->tbm_queue,
+ __wayland_tbm_client_surface_alloc_cb2,
__wayland_tbm_client_surface_free_cb,
queue_info);
width, height, format, TBM_BO_TILED);
WL_TBM_GOTO_IF_FAIL(queue_info->tbm_queue != NULL, fail);
- tbm_surface_queue_set_alloc_cb(queue_info->tbm_queue,
- __wayland_tbm_client_surface_alloc_cb,
+ tbm_surface_queue_set_alloc_cb2(queue_info->tbm_queue,
+ __wayland_tbm_client_surface_alloc_cb2,
__wayland_tbm_client_surface_free_cb,
queue_info);