e_pixmap: canceled buffer_flush it's not needed anymore 82/228482/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 23 Mar 2020 08:07:53 +0000 (17:07 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 23 Mar 2020 09:08:52 +0000 (18:08 +0900)
remote_surface and quickpanel client do buffer_flush with only_free
even if client isn't iconify state.
if buffer_flush_timer is timeout, e_pixmap can't decide to do buffer_flush.
so add e_pixmap_buffer_clear_cancel and call in e_service_quickpanel
and e_comp_wl_rsm when buffer_flush ins't needed.

Change-Id: I8eb632bb0f523516bf455f216ba3af832629eefb

src/bin/e_comp_wl_rsm.c
src/bin/e_pixmap.c
src/bin/e_pixmap.h
src/bin/services/e_service_quickpanel.c

index e5e8319f449b54cd2bd00b4692814bd3a8c31af2..e5ebe1dfe4eac45b6aaa5af96e1be419188008f2 100644 (file)
@@ -433,6 +433,9 @@ _remote_provider_visible_set(E_Comp_Wl_Remote_Provider *provider, Eina_Bool set)
              tizen_remote_surface_provider_send_visibility
                 (provider->resource,
                  TIZEN_REMOTE_SURFACE_PROVIDER_VISIBILITY_TYPE_VISIBLE);
+
+             if (provider->buffer_mode)
+               e_pixmap_buffer_clear_cancel(provider->common.ec->pixmap);
           }
      }
    else
index 8c3478f951b8c3bfd79a3be0feabdea410090c58..df0616d2f5c0d3859e90655f58e289590377f62e 100644 (file)
@@ -1038,7 +1038,8 @@ _e_pixmap_buffer_clear(E_Pixmap *cp, Eina_Bool only_free)
    Eina_List *l, *ll;
 
    if (!cp->client) return;
-   if (!e_policy_visibility_client_is_iconic(cp->client)) return;
+   /* if not only free, client should be iconic state */
+   if (!only_free && !e_policy_visibility_client_is_iconic(cp->client)) return;
 
    DBG("PIXMAP: Buffer Flush(%s) '%s'(%p) only_free:%d", cp->shm_flusher ? "SHM" : "NATIVE",
        cp->client->icccm.name?:"", cp->client, only_free);
@@ -1148,6 +1149,17 @@ e_pixmap_buffer_clear(E_Pixmap *cp, Eina_Bool only_free)
      _e_pixmap_buffer_clear(cp, only_free);
 }
 
+EINTERN void
+e_pixmap_buffer_clear_cancel(E_Pixmap *cp)
+{
+   EINA_SAFETY_ON_NULL_RETURN(cp);
+
+   if (!cp->buffer_flush_timer) return;
+
+   ecore_timer_del(cp->buffer_flush_timer);
+   cp->buffer_flush_timer = NULL;
+}
+
 EINTERN void *
 e_pixmap_ref_resource_get(E_Pixmap *cp)
 {
index d121def089253100dfacfd3546359cc51f7d1b07..755b5bdd3171d918bbea217621f3048f5bf3ec87 100644 (file)
@@ -84,6 +84,7 @@ E_API Eina_Bool e_pixmap_init(void);
 E_API void e_pixmap_shutdown(void);
 E_API void e_pixmap_buffer_clear(E_Pixmap *cp, Eina_Bool only_free);
 
+EINTERN void e_pixmap_buffer_clear_cancel(E_Pixmap *cp);
 EINTERN void *e_pixmap_ref_resource_get(E_Pixmap *cp);
 
 static inline Eina_Bool
index 83c444bec8d4b64259620419a698d5c47901c665..05b9dcae758559e1e283d52813621cdeb1130c21 100644 (file)
@@ -1229,6 +1229,7 @@ static void
 _quickpanel_client_evas_cb_show(void *data, Evas *evas, Evas_Object *obj, void *event)
 {
    E_Policy_Quickpanel *qp;
+   E_Client *ec;
 
    qp = data;
    if (EINA_UNLIKELY(!qp))
@@ -1238,6 +1239,10 @@ _quickpanel_client_evas_cb_show(void *data, Evas *evas, Evas_Object *obj, void *
    evas_object_raise(qp->handler_obj);
    evas_object_hide(qp->indi_obj);
 
+   ec = qp->ec;
+   if (ec)
+     e_pixmap_buffer_clear_cancel(ec->pixmap);
+
    E_FREE_FUNC(qp->buf_change_hdlr, ecore_event_handler_del);
 }