e_hwc_window: set client type if e_pixmap resource is null 51/230051/3
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 7 Apr 2020 10:44:56 +0000 (19:44 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 13 Apr 2020 10:10:34 +0000 (19:10 +0900)
in rotation module, e_pixmap resource is set by null for skip frame.
it cause deadlock if client is set HWC and reserved memory is double buffer

Change-Id: I0ce110ece3716103f73dea824aa23fa1c45d7623

src/bin/e_hwc_window.c

index 8a2b9b2684cf2694af867e789c82ed03c0bae970..e2a723cccfbd061cec9254b9aae765c57ae71ae9 100644 (file)
@@ -87,6 +87,7 @@ typedef enum _E_Hwc_Window_Restriction
    E_HWC_WINDOW_RESTRICTION_UI_SUBSURFACE,
    E_HWC_WINDOW_RESTRICTION_CONTENT_IMAGE,
    E_HWC_WINDOW_RESTRICTION_QUICKPANEL_OPEN,
+   E_HWC_WINDOW_RESTRICTION_PIXMAP_RESOURCE,
 } E_Hwc_Window_Restriction;
 
 static Eina_Bool ehw_trace = EINA_FALSE;
@@ -1656,6 +1657,7 @@ e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
 {
    E_Client *ec = NULL;
    E_Comp_Wl_Client_Data *cdata = NULL;
+   E_Pixmap *pixmap = NULL;
    E_Output *eout = NULL;
    int minw = 0, minh = 0;
    int transform;
@@ -1696,6 +1698,14 @@ e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
         goto finish;
      }
 
+   pixmap = ec->pixmap;
+   if ((!pixmap) || (!e_pixmap_resource_get(pixmap)))
+     {
+        restriction = E_HWC_WINDOW_RESTRICTION_PIXMAP_RESOURCE;
+        available = EINA_FALSE;
+        goto finish;
+     }
+
    if ((cdata->width_from_buffer != cdata->width_from_viewport) ||
        (cdata->height_from_buffer != cdata->height_from_viewport))
      {
@@ -2149,6 +2159,8 @@ e_hwc_window_restriction_string_get(E_Hwc_Window *hwc_window)
        return "content image";
      case E_HWC_WINDOW_RESTRICTION_QUICKPANEL_OPEN:
        return "quickpanel open";
+     case E_HWC_WINDOW_RESTRICTION_PIXMAP_RESOURCE:
+       return "pixmap resource";
      default:
        return "UNKNOWN";
     }