if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
return;
+ e_hwc_window_preparation_set(ec->hwc_window, TDM_PREPARATION_NONE);
+
if (!ec->hwc_window) return;
e_hwc_window_free(ec->hwc_window);
return EINA_FALSE;
}
+EINTERN Eina_Bool
+e_hwc_window_preparation_set(E_Hwc_Window *hwc_window, int preparation_types)
+{
+ E_Hwc_Window_Queue *queue = NULL;
+
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(hwc_window, EINA_FALSE);
+
+ if (hwc_window->preparation_types == preparation_types) return EINA_TRUE;
+
+ if (preparation_types & TDM_PREPARATION_BUFFER_QUEUE)
+ {
+ if (!hwc_window->queue)
+ {
+ queue = e_hwc_window_queue_user_set(hwc_window);
+ if (!queue)
+ {
+ ERR("fail to e_hwc_window_queue_user_set ehw:%p", hwc_window);
+ hwc_window->queue = NULL;
+ return EINA_FALSE;
+ }
+
+ wl_signal_add(&queue->destroy_signal, &hwc_window->queue_destroy_listener);
+ hwc_window->queue_destroy_listener.notify = _e_hwc_window_cb_queue_destroy;
+ hwc_window->queue = queue;
+ }
+ }
+ else
+ {
+ if (hwc_window->queue)
+ {
+ e_hwc_window_queue_user_unset(hwc_window->queue, hwc_window);
+ wl_list_remove(&hwc_window->queue_destroy_listener.link);
+ hwc_window->queue = NULL;
+ }
+ }
+
+ hwc_window->preparation_types = preparation_types;
+
+ return EINA_TRUE;
+}
+
static void
_e_hwc_window_client_recover(E_Hwc_Window *hwc_window)
{
tbm_surface_h tsurface;
} cursor;
+ int preparation_types;
+
E_Hwc_Window_Queue *queue;
struct wl_listener queue_destroy_listener;
EINTERN Eina_Bool e_hwc_window_accepted_state_set(E_Hwc_Window *hwc_window, E_Hwc_Window_State state);
EINTERN E_Hwc_Window_State e_hwc_window_accepted_state_get(E_Hwc_Window *hwc_window);
+EINTERN Eina_Bool e_hwc_window_preparation_set(E_Hwc_Window *hwc_window, int preparation_types);
+
EINTERN void e_hwc_window_render_list_add(E_Hwc_Window *hwc_window);
EINTERN Eina_Bool e_hwc_window_is_on_target_window(E_Hwc_Window *hwc_window);
EINTERN Eina_Bool e_hwc_window_render_target_window_set(E_Hwc_Window *hwc_window, Eina_Bool set);
queue->state = E_HWC_WINDOW_QUEUE_STATE_UNSET;
+ if (queue->state == E_HWC_WINDOW_QUEUE_STATE_PENDING_UNSET)
+ hwc_window = queue->pending_unset_user;
+ else
+ hwc_window = queue->user;
+
+ tdm_hwc_window_release_buffer_queue(hwc_window, queue->tqueue);
+
if (queue->user)
{
e_object_unref(E_OBJECT(queue->user));
if (hwc_window->is_target)
tqueue = _get_tbm_surface_queue();
else
- tqueue = tdm_hwc_window_get_buffer_queue(hwc_window->thwc_window, &error);
+ tqueue = tdm_hwc_window_acquire_buffer_queue(hwc_window->thwc_window, &error);
if (!tqueue)
{
e_hwc_window_accepted_state_set(target_window, state);
}
+static void
+_e_hwc_windows_preparation_update(E_Hwc *hwc)
+{
+ tdm_error terror;
+ E_Hwc_Window *hwc_window;
+ const Eina_List *l;
+ int preparation_types;
+
+ EINA_LIST_FOREACH(hwc->hwc_windows, l, hwc_window)
+ {
+ if (hwc_window->is_target) continue;
+ if (!hwc_window->thwc_window) continue;
+
+ terror = tdm_hwc_window_get_preparation_types(hwc_window->thwc_window,
+ &preparation_types);
+ if (terror != TDM_ERROR_NONE) continue;
+
+ e_hwc_window_preparation_set(hwc_window, preparation_types);
+ }
+
+ return;
+}
+
/* evaluate the hwc_windows */
static Eina_Bool
_e_hwc_windows_evaluate(E_Hwc *hwc)
else
EHWSTRACE(" Need the comopsition re-evaulation.", NULL);
+ _e_hwc_windows_preparation_update(hwc);
+
/* decide the E_HWC_MODE */
hwc_mode = _e_hwc_windows_hwc_mode_get(hwc);
if (hwc->hwc_mode != hwc_mode)