}
else
{
- /* delete the E_Hwc_Window_Queue */
- _e_hwc_window_queue_destroy(queue);
+ /* if queue is not for target window, delete the E_Hwc_Window_Queue here */
+ if (!queue->is_target)
+ _e_hwc_window_queue_destroy(queue);
}
}
static void
_e_hwc_window_queue_cb_destroy(tbm_surface_queue_h surface_queue, void *data)
{
- //TODO: check if the backend delete the tsurface_queue.
- // PLEASE Deal with it... if there are pending_users on this queue.
- // if the backend deletes the tsurface_queue and
- // if there is a pending user at the same equeue(tsurface_queue),
- // That means that the backend has the wrong policy at the validation.
+ E_Hwc_Window_Queue *queue = (E_Hwc_Window_Queue *)data;
+
+ if (!queue) return;
+
+ _e_hwc_window_queue_destroy(queue);
}
static E_Hwc_Window_Queue *
EINA_SAFETY_ON_NULL_RETURN_VAL(queue, NULL);
if (e_hwc_window_is_target(hwc_window))
- return queue;
+ {
+ queue->is_target = EINA_TRUE;
+ return queue;
+ }
if (queue->user ||
queue->state == E_HWC_WINDOW_QUEUE_STATE_UNSET_WAITING)
E_Hwc_Window *user_waiting_unset;
Eina_List *user_pending_set;
E_Hwc_Window_Queue_State state;
+
+ Eina_Bool is_target;
};
struct _E_Hwc_Window_Queue_Buffer