return EINA_TRUE;
}
+
+EINTERN struct wayland_tbm_client_queue *
+e_comp_wl_tbm_client_queue_get(E_Client *ec)
+{
+ struct wayland_tbm_client_queue * cqueue;
+ E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
+ E_Comp_Wl_Client_Data *cdata;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
+
+ cdata = e_pixmap_cdata_get(ec->pixmap);
+ if (!cdata) return NULL;
+ if (!cdata->wl_surface) return NULL;
+
+ cqueue = wayland_tbm_server_client_queue_get(wl_cdata->tbm.server, cdata->wl_surface);
+
+ return cqueue;
+}
# define E_COMP_WL_TBM_H
#include <tbm_surface.h>
+#include <wayland-tbm-server.h>
struct _E_Comp_Wl_Tbm_Funcs
{
EINTERN Eina_Bool e_comp_wl_tbm_gbm_bo_user_data_set(tbm_surface_h tsurface, void *gbo);
+EINTERN struct wayland_tbm_client_queue *e_comp_wl_tbm_client_queue_get(E_Client *ec);
+
# endif
#endif
return cdata->buffer_ref.buffer;
}
-struct wayland_tbm_client_queue *
-e_hwc_window_wayland_tbm_client_queue_get(E_Hwc_Window *hwc_window)
-{
- struct wayland_tbm_client_queue * cqueue;
- struct wl_resource *wl_surface;
- E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
- E_Comp_Wl_Client_Data *cdata;
- E_Client *ec;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
- EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, NULL);
-
- ec = hwc_window->ec;
- if (!ec) return NULL;
-
- cdata = e_pixmap_cdata_get(ec->pixmap);
- EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, NULL);
-
- wl_surface = cdata->wl_surface;
- EINA_SAFETY_ON_NULL_RETURN_VAL(wl_surface, NULL);
-
- cqueue = wayland_tbm_server_client_queue_get(wl_cdata->tbm.server, wl_surface);
-
- return cqueue;
-}
-
static tdm_hwc_window_composition
_get_composition_type(E_Hwc_Window_State state)
{
queue_height = tbm_surface_queue_get_height(queue->tqueue);
}
- cqueue = e_hwc_window_wayland_tbm_client_queue_get(hwc_window);
+ cqueue = e_comp_wl_tbm_client_queue_get(hwc_window->ec);
if (cqueue)
{
wayland_tbm_server_client_queue_activate(cqueue, 0, queue_size,
{
if (constraints & TDM_HWC_WIN_CONSTRAINT_BUFFER_QUEUE)
{
- cqueue = e_hwc_window_wayland_tbm_client_queue_get(hwc_window);
+ cqueue = e_comp_wl_tbm_client_queue_get(hwc_window->ec);
if (!cqueue) return EINA_FALSE;
if (!_e_hwc_window_buffer_queue_set(hwc_window))
EINTERN Eina_Bool e_hwc_window_presentation_callback_take(E_Hwc_Window *hwc_window, E_Hwc_Presentation_Callback_List *src_list);
EINTERN Eina_Bool e_hwc_window_presentation_callback_call(E_Hwc_Window *hwc_window);
-struct wayland_tbm_client_queue *e_hwc_window_wayland_tbm_client_queue_get(E_Hwc_Window *hwc_window);
-
#endif // E_HWC_WINDOW_H
#endif
static Eina_List *hwc_window_queue_comp_wl_hooks = NULL;
static E_Hwc_Window_Queue_Manager *_hwc_winq_mgr = NULL;
-struct wayland_tbm_client_queue *
-_user_cqueue_get(E_Client *ec)
-{
- struct wayland_tbm_client_queue * cqueue;
- struct wl_resource *wl_surface;
- E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
- E_Comp_Wl_Client_Data *cdata;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
-
- if (!ec) return NULL;
-
- cdata = e_pixmap_cdata_get(ec->pixmap);
- if (!cdata) return NULL;
-
- wl_surface = cdata->wl_surface;
- if (!wl_surface) return NULL;
-
- cqueue = wayland_tbm_server_client_queue_get(wl_cdata->tbm.server, wl_surface);
-
- return cqueue;
-}
-
static uint32_t
_comp_wl_buffer_flags_get(E_Comp_Wl_Buffer *buffer)
{
return EINA_FALSE;
}
- cqueue = _user_cqueue_get(hwc_window->ec);
+ cqueue = e_comp_wl_tbm_client_queue_get(hwc_window->ec);
if (!cqueue)
{
EHWQERR("fail to get wayland_tbm_client_queue", hwc_window->ec, queue->hwc, queue);
(hwc_window->current.buffer.transform < 4) ? hwc_window->current.buffer.transform * 90 : (hwc_window->current.buffer.transform - 4) * 90,
(uintptr_t)hwc_window->display.buffer.tsurface,
(uintptr_t)hwc_window->queue,
- (uintptr_t)e_hwc_window_wayland_tbm_client_queue_get(hwc_window),
+ hwc_window->ec ? (uintptr_t)e_comp_wl_tbm_client_queue_get(hwc_window->ec) : 0,
vis_skip ? "TRUE" : "FALSE",
e_hwc_window_restriction_string_get(hwc_window));
eldbus_message_iter_basic_append(line_array, 's', info_str);
{
struct wayland_tbm_client_queue * cqueue;
- cqueue = wayland_tbm_server_client_queue_get(e_comp_wl->tbm.server,
- cp->client->comp_data->wl_surface);
+ cqueue = e_comp_wl_tbm_client_queue_get(cp->client);
if (!cqueue) return;
if (only_free)
static void
_launcher_target_ec_queue_flush(E_Service_Launcher *lc)
{
- E_Comp_Wl_Client_Data *target_cdata = NULL;
struct wayland_tbm_client_queue *cqueue;
if (!e_comp_wl) return;
if (!lc) return;
if (!lc->target.ec) return;
- target_cdata = e_client_cdata_get(lc->target.ec);
- if (!target_cdata) return;
- if (!target_cdata->wl_surface) return;
if (e_object_is_del(E_OBJECT(lc->target.ec))) return;
- cqueue = wayland_tbm_server_client_queue_get(e_comp_wl->tbm.server, target_cdata->wl_surface);
+ cqueue = e_comp_wl_tbm_client_queue_get(lc->target.ec);
if (cqueue)
wayland_tbm_server_client_queue_flush(cqueue);
}