e_hwc_window_queue: use e_client_cdata_get 75/247475/3
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 11 Nov 2020 00:46:32 +0000 (09:46 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 11 Nov 2020 08:52:25 +0000 (08:52 +0000)
Change-Id: I75a1eb03dc0416dccb8e4ce8d5ce3056dc87240a

src/bin/e_hwc_window_queue.c

index eaf9628..a0c1fed 100644 (file)
@@ -110,13 +110,13 @@ _user_cqueue_get(E_Client *ec)
    struct wayland_tbm_client_queue * cqueue = NULL;
    struct wl_resource *wl_surface = NULL;
    E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
-   E_Comp_Wl_Client_Data *cdata = NULL;
+   E_Comp_Wl_Client_Data *cdata;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
 
    if (!ec) return NULL;
 
-   cdata = (E_Comp_Wl_Client_Data *)e_pixmap_cdata_get(ec->pixmap);
+   cdata = e_pixmap_cdata_get(ec->pixmap);
    if (!cdata) return NULL;
 
    wl_surface = cdata->wl_surface;
@@ -156,11 +156,11 @@ _comp_wl_buffer_flags_get(E_Comp_Wl_Buffer *buffer)
 static E_Comp_Wl_Buffer *
 _comp_wl_buffer_get(E_Client *ec)
 {
-   E_Comp_Wl_Client_Data *cdata = NULL;
+   E_Comp_Wl_Client_Data *cdata;
 
    if (!ec) return NULL;
 
-   cdata = ec->comp_data;
+   cdata = e_client_cdata_get(ec);
    if (!cdata) return NULL;
 
    return cdata->buffer_ref.buffer;
@@ -830,7 +830,8 @@ _e_hwc_window_queue_backup_buffer_set(E_Hwc_Window *hwc_window, Eina_Bool attach
      }
    else
      {
-        e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, backup_buffer);
+        E_Comp_Wl_Client_Data *cdata = e_client_cdata_get(ec);
+        e_comp_wl_buffer_reference(&cdata->buffer_ref, backup_buffer);
         e_pixmap_resource_set(ec->pixmap, backup_buffer);
         e_pixmap_dirty(ec->pixmap);
         e_pixmap_refresh(ec->pixmap);