From 0abd931f3714f471d13aad524d2fda9503adaf68 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Fri, 19 Feb 2016 08:30:17 +0900 Subject: [PATCH] ecore-evas-drm: hwc:check the possibility of drawing canvas The wait_for_showup flags is set by enlightenment hwc. The wait_for_showup flags is set to be true when enlightenment display something on a screen. And the flags is set to be false when the enlightenment is done to display the image on a screen. Change-Id: I221d7ae53d4a02e8a2012e88212d8ec18c0d90f3 --- .../ecore_evas/engines/drm/ecore_evas_drm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) mode change 100644 => 100755 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c old mode 100644 new mode 100755 index 8c6d3b7..2eca8bf --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -1011,6 +1011,23 @@ _ecore_evas_drm_aspect_set(Ecore_Evas *ee, double aspect) ee->prop.aspect = aspect; } +#ifdef BUILD_ECORE_EVAS_GL_DRM +static Eina_Bool +_ecore_evas_drm_render_check_skip(Ecore_Evas *ee) +{ + Evas_Engine_Info_GL_Drm *einfo; + einfo = (Evas_Engine_Info_GL_Drm *)evas_engine_info_get(ee->evas); + if (!einfo) return EINA_TRUE; + if (!einfo->info.hwc_enable) return EINA_FALSE; + + /* HWC: wait_for_showup is set by enlightenment */ + if (einfo->info.wait_for_showup) + INF("HWC: skip to render the ecore_evas.\n"); + + return einfo->info.wait_for_showup; +} +#endif + static int _ecore_evas_drm_render(Ecore_Evas *ee) { @@ -1026,6 +1043,11 @@ _ecore_evas_drm_render(Ecore_Evas *ee) return 0; } +#ifdef BUILD_ECORE_EVAS_GL_DRM + /* HWC: check if the ecore_evas is skipped or not */ + if (_ecore_evas_drm_render_check_skip(ee)) return 0; +#endif + EINA_LIST_FOREACH(ee->sub_ecore_evas, l, ee2) { if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2); -- 2.7.4