Eina_List *rendered_windows = NULL;
E_Hwc_Window_Queue_Buffer *queue_buffer = NULL;
E_Hwc_Windows_Buffer_Comp_Info *buffer_comp_info;
+ E_Hwc_Window_Queue *queue;
uint32_t n_thw = 0;
const Eina_List *l;
int i;
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window->queue , EINA_FALSE);
- if ((hwc_window->state == E_HWC_WINDOW_STATE_DEVICE) ||
- (hwc->pp_set && hwc->pp_hwc_window))
+ if ((hwc->pp_set) && (target_hwc_window->pp_queue))
+ queue = target_hwc_window->pp_queue;
+ else
+ queue = hwc_window->queue;
+
+ if (hwc_window->state == E_HWC_WINDOW_STATE_DEVICE)
{
/* acquire the surface */
- queue_buffer = e_hwc_window_queue_buffer_acquire(hwc_window->queue);
+ queue_buffer = e_hwc_window_queue_buffer_acquire(queue);
if (!queue_buffer) return EINA_FALSE;
tsurface = queue_buffer->tsurface;
{
e_hwc_window_presentation_time_feedback_take(hwc_window,
&buffer_comp_info->presentation_container);
- e_hwc_window_queue_buffer_release(hwc_window->queue, queue_buffer);
+ e_hwc_window_queue_buffer_release(queue, queue_buffer);
return EINA_FALSE;
}
e_hwc_window_queue_buffer_release(hwc_window->buffer.queue, queue_buffer);
}
- e_hwc_window_buffer_set(&hwc_window->buffer, tsurface, hwc_window->queue);
+ e_hwc_window_buffer_set(&hwc_window->buffer, tsurface, queue);
e_hwc_window_info_update(hwc_window);
/* the damage isn't supported by hwc extension yet */
}
else
{
- e_hwc_window_queue_clear(hwc_window->queue);
+ e_hwc_window_queue_clear(queue);
if (!hwc_window->buffer.tsurface) return EINA_FALSE;
}
static void
+_e_hwc_windows_target_cb_pp_queue_destroy(struct wl_listener *listener, void *data)
+{
+ E_Hwc_Window_Target *target_hwc_window = NULL;
+
+ target_hwc_window = container_of(listener, E_Hwc_Window_Target, pp_queue_destroy_listener);
+ EINA_SAFETY_ON_NULL_RETURN(target_hwc_window);
+
+ if ((E_Hwc_Window_Queue *)data != target_hwc_window->pp_queue) return;
+
+ if (target_hwc_window->pp_queue_destroy_listener.notify)
+ {
+ wl_list_remove(&target_hwc_window->pp_queue_destroy_listener.link);
+ target_hwc_window->pp_queue_destroy_listener.notify = NULL;
+ }
+
+ target_hwc_window->pp_queue = NULL;
+}
+
+static Eina_Bool
+_e_hwc_windows_target_window_pp_queue_set(E_Hwc_Window_Target *target_hwc_window, E_Hwc_Window_Queue *queue)
+{
+ if (target_hwc_window->pp_queue == queue)
+ return EINA_TRUE;
+
+ if (target_hwc_window->pp_queue)
+ {
+ wl_list_remove(&target_hwc_window->pp_queue_destroy_listener.link);
+ target_hwc_window->pp_queue_destroy_listener.notify = NULL;
+ }
+
+ if (queue)
+ {
+ wl_signal_add(&queue->destroy_signal, &target_hwc_window->pp_queue_destroy_listener);
+ target_hwc_window->pp_queue_destroy_listener.notify = _e_hwc_windows_target_cb_pp_queue_destroy;
+ target_hwc_window->pp_queue = queue;
+ }
+
+ return EINA_TRUE;
+}
+
+static void
_e_hwc_windows_target_cb_queue_destroy(struct wl_listener *listener, void *data)
{
E_Hwc_Window *hwc_window = NULL;