e_hwc_windows: use the target window when there is not pp_window 37/214637/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 25 Sep 2019 01:38:13 +0000 (10:38 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 25 Sep 2019 01:38:13 +0000 (10:38 +0900)
The target window is the src buffer for the zoom pp when
there is not pp_window.

Change-Id: I1e7950857a166267e24573aef69b24dc0ee23f31

src/bin/e_hwc_windows.c

index 87ef1dd358d753d54926b775a2e88a73ea7495ac..cd956e9073a42746f4c5d457218390aaf280c897 100644 (file)
@@ -1557,10 +1557,8 @@ pp_fail:
 static E_Hwc_Window *
 _e_hwc_windows_pp_get_hwc_window_for_zoom(E_Hwc *hwc)
 {
-   const Eina_List *l;
-   E_Hwc_Window *hwc_window = NULL;
+   E_Hwc_Window_Target *target_hwc_window = NULL;
    E_Hwc_Window *hwc_window_for_zoom = NULL;
-   int num = 0;
    int w, h;
 
    e_output_size_get(hwc->output, &w, &h);
@@ -1575,19 +1573,11 @@ _e_hwc_windows_pp_get_hwc_window_for_zoom(E_Hwc *hwc)
      }
    else
      {
-        EINA_LIST_FOREACH(hwc->hwc_windows, l, hwc_window)
-          {
-             if (!e_hwc_window_is_on_hw_overlay(hwc_window)) continue;
-
-             hwc_window_for_zoom = hwc_window;
-             num++;
-          }
+        target_hwc_window = hwc->target_hwc_window;
+        EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, NULL);
 
-        if (num != 1) return NULL;
+        hwc_window_for_zoom = (E_Hwc_Window *)target_hwc_window;
         if (!hwc_window_for_zoom->buffer.tsurface) return NULL;
-        if (tbm_surface_get_width(hwc_window_for_zoom->buffer.tsurface) != w ||
-            tbm_surface_get_height(hwc_window_for_zoom->buffer.tsurface) != h)
-          return NULL;
      }
 
    return hwc_window_for_zoom;