}
static void
-_e_hwc_windows_pp_pending_data_remove(E_Hwc *hwc)
-{
- E_Hwc_Window_Commit_Data *data = NULL;
- Eina_List *l = NULL, *ll = NULL;
-
- if (eina_list_count(hwc->pending_pp_commit_data_list) != 0)
- {
- EINA_LIST_FOREACH_SAFE(hwc->pending_pp_commit_data_list, l, ll, data)
- {
- if (!data) continue;
- hwc->pending_pp_commit_data_list = eina_list_remove_list(hwc->pending_pp_commit_data_list, l);
- tbm_surface_queue_release(hwc->pp_tqueue, data->buffer.tsurface);
- tbm_surface_internal_unref(data->buffer.tsurface);
- E_FREE(data);
- }
- }
- eina_list_free(hwc->pending_pp_commit_data_list);
- hwc->pending_pp_commit_data_list = NULL;
-
- if (eina_list_count(hwc->pending_pp_hwc_window_list) != 0)
- {
- E_Hwc_Window *hwc_window;
- EINA_LIST_FOREACH_SAFE(hwc->pending_pp_hwc_window_list, l, ll, hwc_window)
- {
- if (!hwc_window) continue;
- hwc->pending_pp_hwc_window_list = eina_list_remove_list(hwc->pending_pp_hwc_window_list, l);
-
- if (hwc_window->ec) e_pixmap_image_clear(hwc_window->ec->pixmap, 1);
- e_hwc_window_commit_data_release(hwc_window);
- }
- }
- eina_list_free(hwc->pending_pp_hwc_window_list);
- hwc->pending_pp_hwc_window_list = NULL;
-}
-
-static void
_e_hwc_windows_pp_output_commit_handler(tdm_output *toutput, unsigned int sequence,
unsigned int tv_sec, unsigned int tv_usec,
void *user_data)
hwc = user_data;
- hwc->pp_output_commit = EINA_FALSE;
-
_e_hwc_windows_commit_data_release(hwc, sequence, tv_sec, tv_usec);
hwc->wait_commit = EINA_FALSE;
hwc->pp_commit = EINA_FALSE;
output = hwc->output;
if (e_output_dpms_get(output))
- {
- _e_hwc_windows_pp_pending_data_remove(hwc);
- return;
- }
-
- /* deal with the pending layer commit */
- if (eina_list_count(hwc->pending_pp_commit_data_list) != 0)
- {
- data = eina_list_nth(hwc->pending_pp_commit_data_list, 0);
- if (data)
- {
- hwc->pending_pp_commit_data_list = eina_list_remove(hwc->pending_pp_commit_data_list, data);
-
- EHWSTRACE("PP Output Commit Handler start pending commit data(%p) tsurface(%p)", NULL, hwc, data, data->buffer.tsurface);
-
- if (!_e_hwc_windows_pp_output_data_commit(hwc, data))
- {
- EHWSERR("fail to _e_hwc_windows_pp_output_data_commit", hwc);
- return;
- }
- }
- }
-
- /* deal with the pending pp commit */
- if (eina_list_count(hwc->pending_pp_hwc_window_list) != 0)
- {
- E_Hwc_Window *hwc_window;
-
- hwc_window = eina_list_nth(hwc->pending_pp_hwc_window_list, 0);
- if (hwc_window)
- {
- if (!tbm_surface_queue_can_dequeue(hwc->pp_tqueue, 0))
- return;
-
- hwc->pending_pp_hwc_window_list = eina_list_remove(hwc->pending_pp_hwc_window_list, hwc_window);
-
- EHWSTRACE("PP Output Commit Handler start pending pp data(%p) tsurface(%p)", NULL, hwc, hwc_window, hwc_window->buffer.tsurface);
-
- if (!_e_hwc_windows_pp_window_commit(hwc, hwc_window))
- {
- EHWSERR("fail _e_hwc_windows_pp_data_commit", hwc);
- e_hwc_window_commit_data_release(hwc_window);
- return;
- }
- }
- }
+ return;
}
static Eina_Bool
output = hwc->output;
if (e_output_dpms_get(output))
- {
- _e_hwc_windows_pp_pending_data_remove(hwc);
- goto fail;
- }
+ goto fail;
EHWSTRACE("!!!!!!!! HWC PP Output Commit !!!!!!!!", NULL, hwc);
EHWSTRACE(" tsurface(%p)", NULL, hwc, data->buffer.tsurface);
goto fail;
}
- hwc->pp_output_commit = EINA_TRUE;
hwc->pp_output_commit_data = data;
return EINA_TRUE;
data->buffer.tsurface = pp_tsurface;
tbm_surface_internal_ref(data->buffer.tsurface);
- if (hwc->pp_output_commit)
- {
- hwc->pending_pp_commit_data_list = eina_list_append(hwc->pending_pp_commit_data_list, data);
- return EINA_TRUE;
- }
-
if (!_e_hwc_windows_pp_output_data_commit(hwc, data))
{
EHWSERR("fail to _e_hwc_windows_pp_output_data_commit", hwc);
output = hwc->output;
if (e_output_dpms_get(output))
{
- _e_hwc_windows_pp_pending_data_remove(hwc);
tbm_surface_queue_release(hwc->pp_tqueue, tsurface_dst);
_e_hwc_windows_commit_data_release(hwc, 0, 0, 0);
output = hwc->output;
if (e_output_dpms_get(output))
- {
- _e_hwc_windows_pp_pending_data_remove(hwc);
- return EINA_FALSE;
- }
+ return EINA_FALSE;
tbm_err = tbm_surface_queue_dequeue(hwc->pp_tqueue, &pp_tsurface);
if (tbm_err != TBM_ERROR_NONE)
EHWSTRACE("PP Commit Can Dequeue failed tsurface(%p) tqueue(%p) wl_buffer(%p) data(%p)",
NULL, hwc, commit_data->buffer.tsurface, hwc->pp_tqueue,
commit_data->buffer_ref.buffer ? commit_data->buffer_ref.buffer->resource : NULL, commit_data);
- hwc->pending_pp_hwc_window_list = eina_list_append(hwc->pending_pp_hwc_window_list, hwc_window);
-
- hwc->wait_commit = EINA_TRUE;
-
- return EINA_TRUE;
- }
-
- if (eina_list_count(hwc->pending_pp_hwc_window_list) != 0)
- {
- EHWSTRACE("PP Commit Pending pp data remained tsurface(%p) tqueue(%p) wl_buffer(%p) data(%p)",
- NULL, hwc, commit_data->buffer.tsurface, hwc->pp_tqueue,
- commit_data->buffer_ref.buffer ? commit_data->buffer_ref.buffer->resource : NULL, commit_data);
- hwc->pending_pp_hwc_window_list = eina_list_append(hwc->pending_pp_hwc_window_list, hwc_window);
hwc->wait_commit = EINA_TRUE;
return EINA_TRUE;
}
-static Eina_Bool
-_e_hwc_windos_pp_pending_window_check(E_Hwc *hwc)
-{
- E_Hwc_Window *hwc_window = NULL;
- E_Hwc_Window *hwc_window_pp = NULL;
- const Eina_List *l;
-
- if (eina_list_count(hwc->pending_pp_hwc_window_list) != 0)
- {
- hwc_window_pp = _e_hwc_windows_pp_get_hwc_window_for_zoom(hwc);
- EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window_pp, EINA_FALSE);
-
- EINA_LIST_FOREACH(hwc->pending_pp_hwc_window_list, l, hwc_window)
- {
- if (hwc_window == hwc_window_pp)
- return EINA_TRUE;
- }
- }
-
- return EINA_FALSE;
-}
-
static void
_e_hwc_windows_center_rect_get(int src_w, int src_h, int dst_w, int dst_h, Eina_Rectangle *fit)
{
return EINA_TRUE;
}
- if (hwc->pp_set)
- {
- if (_e_hwc_windos_pp_pending_window_check(hwc))
- return EINA_TRUE;
- }
-
if (!_e_hwc_windows_commit_data_acquire(hwc))
return EINA_TRUE;
return EINA_FALSE;
}
- if (hwc->pending_pp_hwc_window_list)
- {
- if (eina_list_count(hwc->pending_pp_hwc_window_list) != 0)
- return EINA_FALSE;
- }
-
return EINA_TRUE;
}
hwc->pp_hwc_window = NULL;
hwc->pp_unset = EINA_TRUE;
- _e_hwc_windows_pp_pending_data_remove(hwc);
-
if (hwc->pp_tsurface)
tbm_surface_queue_release(hwc->pp_tqueue, hwc->pp_tsurface);