From: Changyeon Lee Date: Mon, 23 Mar 2020 08:07:53 +0000 (+0900) Subject: e_pixmap: canceled buffer_flush it's not needed anymore X-Git-Tag: submit/tizen/20200323.101502~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F228482%2F1;p=platform%2Fupstream%2Fenlightenment.git e_pixmap: canceled buffer_flush it's not needed anymore 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 --- diff --git a/src/bin/e_comp_wl_rsm.c b/src/bin/e_comp_wl_rsm.c index e5e8319f44..e5ebe1dfe4 100644 --- a/src/bin/e_comp_wl_rsm.c +++ b/src/bin/e_comp_wl_rsm.c @@ -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 diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index 8c3478f951..df0616d2f5 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -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) { diff --git a/src/bin/e_pixmap.h b/src/bin/e_pixmap.h index d121def089..755b5bdd31 100644 --- a/src/bin/e_pixmap.h +++ b/src/bin/e_pixmap.h @@ -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 diff --git a/src/bin/services/e_service_quickpanel.c b/src/bin/services/e_service_quickpanel.c index 83c444bec8..05b9dcae75 100644 --- a/src/bin/services/e_service_quickpanel.c +++ b/src/bin/services/e_service_quickpanel.c @@ -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); }