From 648a8168ffc818fda1b95888015956e790cf4c13 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Wed, 4 Mar 2020 20:18:41 +0900 Subject: [PATCH] e_hwc_window_queue: change state of queue even if norender is pushed change state of queue when accpeted state of target window is changed, because if noreder is pushed, hwc doesn't accept hwc. Change-Id: I2203e7dea05204b8513ad62f578160331ded5497 --- src/bin/e_hwc_window_queue.c | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/bin/e_hwc_window_queue.c b/src/bin/e_hwc_window_queue.c index 1c81654a77..cf0f95352f 100644 --- a/src/bin/e_hwc_window_queue.c +++ b/src/bin/e_hwc_window_queue.c @@ -1141,6 +1141,46 @@ _e_hwc_window_queue_cb_buffer_change(void *data, E_Client *ec) _e_hwc_window_unkown_queue_release(tsurface); } +static void +_e_hwc_window_queue_norender_queue_state_set(E_Hwc *hwc) +{ + Eina_Iterator *it; + E_Hwc_Window_Queue *queue; + E_Hwc_Window_State target_accepted_state; + E_Hwc_Window *tmp_hwc_window; + Eina_List *l, *ll; + + it = eina_hash_iterator_data_new(_hwc_winq_mgr->hwc_winq_hash); + if (!it) return; + + target_accepted_state = e_hwc_window_accepted_state_get((E_Hwc_Window *)hwc->target_hwc_window); + + EINA_ITERATOR_FOREACH(it, queue) + { + if (!queue->user) continue; + if (!queue->user->buffer.tsurface) continue; + if (queue->state != E_HWC_WINDOW_QUEUE_STATE_SET_WAITING_BUFFER) continue; + + if ((queue->is_target) && (target_accepted_state == E_HWC_WINDOW_STATE_DEVICE)) + { + if (e_hwc_window_queue_buffer_find(queue, queue->user->buffer.tsurface)) + { + EINA_LIST_FOREACH_SAFE(queue->user_pending_set, l, ll, tmp_hwc_window) + e_hwc_window_constraints_reset(tmp_hwc_window); + + e_hwc_window_constraints_reset(queue->user); + } + } + else + { + if (e_hwc_window_queue_buffer_find(queue, queue->user->buffer.tsurface)) + _e_hwc_window_queue_set(queue); + } + } + + eina_iterator_free(it); +} + void _e_hwc_window_queue_cb_accepted_state_set(void *data, E_Hwc_Window *hwc_window) { @@ -1154,6 +1194,9 @@ _e_hwc_window_queue_cb_accepted_state_set(void *data, E_Hwc_Window *hwc_window) queue = hwc_window->queue; state = e_hwc_window_accepted_state_get(hwc_window); + if (e_hwc_window_is_target(hwc_window) && e_hwc_norender_get(hwc_window->hwc)) + _e_hwc_window_queue_norender_queue_state_set(hwc_window->hwc); + if ((state == E_HWC_WINDOW_STATE_DEVICE)) { if (e_hwc_window_is_target(hwc_window)) -- 2.34.1