e_hwc_windows_queue: unset queue if target need to use it 98/223298/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 11 Dec 2019 05:39:05 +0000 (14:39 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 28 Jan 2020 09:05:37 +0000 (18:05 +0900)
if queue state is waiting_buffer and user of queue has
queue buffer, queue of target must be used by target

Change-Id: I67d1eafd7b70afa715a5ecfa734895b13600b597

src/bin/e_hwc_window_queue.c
src/bin/e_hwc_windows.c

index 953fb00b67c8cd6cd8cef11fef60d141bb4639e0..b9261a3eff9d903a1b0fea47616c8b8f2d1a2902 100644 (file)
@@ -1084,7 +1084,18 @@ _e_hwc_window_queue_cb_accepted_state_set(void *data, E_Hwc_Window *hwc_window)
      {
         if (e_hwc_window_is_target(hwc_window))
           {
-             if (queue->state != E_HWC_WINDOW_QUEUE_STATE_SET) return;
+             if (queue->state == E_HWC_WINDOW_QUEUE_STATE_SET_WAITING_BUFFER)
+               {
+                  if (!queue->user) return;
+                  if (!queue->user->buffer.tsurface) return;
+                  if (!e_hwc_window_queue_buffer_find(queue, queue->user->buffer.tsurface))
+                    return;
+               }
+             else
+               {
+                  if (queue->state != E_HWC_WINDOW_QUEUE_STATE_SET)
+                    return;
+               }
 
              EINA_LIST_FOREACH_SAFE(queue->user_pending_set, l, ll, tmp_hwc_window)
                e_hwc_window_constraints_reset(tmp_hwc_window);
index 40645d7e8446163ff8a173ed0ca383b70f8059a8..0b2967b6dbc5b475c5b1551547303ef73381d360 100644 (file)
@@ -2337,11 +2337,8 @@ _e_hwc_windows_target_state_set(E_Hwc_Window_Target *target_hwc_window, E_Hwc_Wi
 {
    E_Hwc_Window *target_window = (E_Hwc_Window *)target_hwc_window;
 
-   if (target_window->state != state)
-     e_hwc_window_state_set(target_window, state, EINA_FALSE);
-
-   if (target_window->accepted_state != state)
-     e_hwc_window_accepted_state_set(target_window, state);
+   e_hwc_window_state_set(target_window, state, EINA_FALSE);
+   e_hwc_window_accepted_state_set(target_window, state);
 }
 
 /* evaluate the hwc_windows */