e_hwc_windows: check output size to set pp_hwc_window 17/219817/3
authorJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 10 Dec 2019 08:16:06 +0000 (17:16 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 10 Dec 2019 10:24:27 +0000 (10:24 +0000)
if buffer size is not match output size, cannot set to pp_window.

Change-Id: Iaf2db8557168646b3aaa6982ffd3efd6961edcf1
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_hwc_windows.c

index 64bce96..968ac07 100644 (file)
@@ -2240,6 +2240,9 @@ _e_hwc_windows_device_state_available_update(E_Hwc *hwc)
    Eina_Bool available = EINA_TRUE;
    E_Hwc_Window *hwc_window = NULL;
    Eina_List *visible_windows = NULL;
+   int w, h;
+
+   e_output_size_get(hwc->output, &w, &h);
 
    /* make the full_gl_composite when the zoom is enabled */
    if (hwc->pp_set)
@@ -2261,7 +2264,13 @@ _e_hwc_windows_device_state_available_update(E_Hwc *hwc)
              if (hwc_window == NULL)
                hwc->pp_hwc_window = NULL;
              else
-               hwc->pp_hwc_window = hwc_window;
+               {
+                  if (tbm_surface_get_width(hwc_window->buffer.tsurface) != w ||
+                      tbm_surface_get_height(hwc_window->buffer.tsurface) != h)
+                    hwc->pp_hwc_window = NULL;
+                  else
+                    hwc->pp_hwc_window = hwc_window;
+               }
           }
 
         goto finish;