e_hwc_window_queue: consider output transform in queue_set 04/226404/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 26 Feb 2020 06:26:47 +0000 (15:26 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 2 Mar 2020 09:18:23 +0000 (18:18 +0900)
Change-Id: I3a131d96899e83e867c2a5113f68c56052b1284b

src/bin/e_hwc_window_queue.c

index 020a1f23386fc70ba4de3de70555d03c56688e40..1c81654a7768aa623f279b64c200d0e53f88ae8e 100644 (file)
@@ -843,7 +843,9 @@ static Eina_Bool
 _e_hwc_window_queue_prepare_set(E_Hwc_Window_Queue *queue, E_Hwc_Window *hwc_window)
 {
    struct wayland_tbm_client_queue *cqueue = NULL;
+   enum wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
    E_Client *ec = NULL;
+   int w, h;
 
    if (eina_list_data_find(queue->user_pending_set, hwc_window) == hwc_window)
      _e_hwc_window_queue_user_pending_set_remove(queue, hwc_window);
@@ -855,10 +857,22 @@ _e_hwc_window_queue_prepare_set(E_Hwc_Window_Queue *queue, E_Hwc_Window *hwc_win
         return EINA_FALSE;
      }
 
-   if ((queue->width != ec->w) || (queue->height != ec->h))
+   transform = e_comp_wl_output_buffer_transform_get(ec);
+   if ((transform == WL_OUTPUT_TRANSFORM_90) || (transform == WL_OUTPUT_TRANSFORM_270))
+     {
+        w = ec->h;
+        h = ec->w;
+     }
+   else
+     {
+        w = ec->w;
+        h = ec->h;
+     }
+
+   if ((queue->width != w) || (queue->height != h))
      {
         EHWQERR("size mismatch queue(%dx%d) client(%dx%d)",
-                ec, queue->hwc, queue, queue->width, queue->height, ec->w, ec->h);
+                ec, queue->hwc, queue, queue->width, queue->height, w, h);
         return EINA_FALSE;
      }