e_hwc_window_queue: change state of queue even if norender is pushed 03/226703/4
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 4 Mar 2020 11:18:41 +0000 (20:18 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 10 Mar 2020 11:15:11 +0000 (11:15 +0000)
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

index 1c81654a7768aa623f279b64c200d0e53f88ae8e..cf0f95352f1410811eb1dda6eed020fdf55dcc88 100644 (file)
@@ -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))