e_hwc_windows_queue: unset queue if target need to use it 17/223317/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 11 Dec 2019 05:39:05 +0000 (14:39 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 29 Jan 2020 12:42:17 +0000 (12:42 +0000)
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 953fb00..b9261a3 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 d32a62f..93b8092 100644 (file)
@@ -2452,11 +2452,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 */