devilhorns pushed a commit to branch master.
commit e9757ad8ebff8795a4d31e73709763c33a471de1
Author: Chris Michael <[email protected]>
Date: Fri Jun 7 07:26:53 2013 +0100
Add async render support for ecore_evas_wayland_egl
Signed-off-by: Chris Michael <[email protected]>
---
.../engines/wayland/ecore_evas_wayland_egl.c | 41 ++++++++++++++++++++--
1 file changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index 8a0d6d8..b79511f 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -157,6 +157,11 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name,
unsigned int parent,
ee->prop.draw_frame = frame;
ee->alpha = EINA_FALSE;
+ if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER"))
+ ee->can_async_render = 0;
+ else
+ ee->can_async_render = 1;
+
/* frame offset and size */
if (ee->prop.draw_frame)
{
@@ -172,6 +177,10 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name,
unsigned int parent,
evas_output_size_set(ee->evas, ee->w + fw, ee->h + fh);
evas_output_viewport_set(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
+ if (ee->can_async_render)
+ evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
+ _ecore_evas_wl_common_render_updates, ee);
+
/* FIXME: This needs to be set based on theme & scale */
if (ee->prop.draw_frame)
evas_output_framespace_set(ee->evas, fx, fy, fw, fh);
@@ -422,8 +431,8 @@ _ecore_evas_wl_hide(Ecore_Evas *ee)
if (ee->func.fn_hide) ee->func.fn_hide(ee);
}
-static void
-_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
+static void
+_ecore_evas_wayland_egl_alpha_do(Ecore_Evas *ee, int alpha)
{
Evas_Engine_Info_Wayland_Egl *einfo;
Ecore_Evas_Engine_Wl_Data *wdata;
@@ -451,8 +460,21 @@ _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
}
}
+static void
+_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
+{
+ if (ee->in_async_render)
+ {
+ ee->delayed.alpha = alpha;
+ ee->delayed.alpha_changed = EINA_TRUE;
+ return;
+ }
+
+ _ecore_evas_wayland_egl_alpha_do(ee, alpha);
+}
+
static void
-_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
+_ecore_evas_wayland_egl_transparent_do(Ecore_Evas *ee, int transparent)
{
Evas_Engine_Info_Wayland_Egl *einfo;
Ecore_Evas_Engine_Wl_Data *wdata;
@@ -481,6 +503,19 @@ _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int
transparent)
}
}
+static void
+_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
+{
+ if (ee->in_async_render)
+ {
+ ee->delayed.transparent = transparent;
+ ee->delayed.transparent_changed = EINA_TRUE;
+ return;
+ }
+
+ _ecore_evas_wayland_egl_transparent_do(ee, transparent);
+}
+
void
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
{
--
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j