devilhorns pushed a commit to branch master.

commit b9a6337b67429b5d9b223cb32fc5502ebd7f02f2
Author: Chris Michael <[email protected]>
Date:   Fri Jun 7 15:40:46 2013 +0100

    Egl Overhaul (ecore_evas part)
    
    - Add code to allow Async Render with Wayland_Egl
      (NB: Currently disabled. Evas_Textgrid borks when this is enabled)
    - Create ecore_wl_window first so we can get surface and pass to evas.
    - During show, we no longer need to pass the surface to evas.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 .../engines/wayland/ecore_evas_wayland_egl.c       | 42 ++++++++++++----------
 1 file changed, 23 insertions(+), 19 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 e336a51..4b50065 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
@@ -158,10 +158,12 @@ 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;
+   /* NB: Disabled for right now as it causes textgrid (terminology) 
+    * to not draw text anymore */
+   /* 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 +174,15 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, 
unsigned int parent,
         fh = 22;
      }
 
+   if (parent)
+     p = ecore_wl_window_find(parent);
+
+   wdata->parent = p;
+   wdata->win = 
+     ecore_wl_window_new(p, x, y, w + fw, h + fh, 
+                         ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW);
+   ee->prop.window = wdata->win->id;
+
    ee->evas = evas_new();
    evas_data_attach_set(ee->evas, ee);
    evas_output_method_set(ee->evas, method);
@@ -186,22 +197,15 @@ ecore_evas_wayland_egl_new_internal(const char 
*disp_name, unsigned int parent,
    if (ee->prop.draw_frame)
      evas_output_framespace_set(ee->evas, fx, fy, fw, fh);
 
-   if (parent)
-     p = ecore_wl_window_find(parent);
-
    /* FIXME: Get if parent is alpha, and set */
 
-   wdata->parent = p;
-   wdata->win = 
-     ecore_wl_window_new(p, x, y, w + fw, h + fh, 
ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW);
-   ee->prop.window = wdata->win->id;
-
    if ((einfo = (Evas_Engine_Info_Wayland_Egl 
*)evas_engine_info_get(ee->evas)))
      {
         einfo->info.display = ecore_wl_display_get();
         einfo->info.destination_alpha = ee->alpha;
         einfo->info.rotation = ee->rotation;
         einfo->info.depth = 32;
+        einfo->info.surface = ecore_wl_window_surface_create(wdata->win);
         if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
           {
              ERR("Failed to set Evas Engine Info for '%s'", ee->driver);
@@ -374,7 +378,7 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, 
int resize)
 static void 
 _ecore_evas_wl_show(Ecore_Evas *ee)
 {
-   Evas_Engine_Info_Wayland_Egl *einfo;
+   /* Evas_Engine_Info_Wayland_Egl *einfo; */
    Ecore_Evas_Engine_Wl_Data *wdata;
    int fw, fh;
 
@@ -391,12 +395,12 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
         ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
 //        ecore_wl_window_buffer_attach(wdata->win, NULL, 0, 0);
 
-        einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas);
-        if (einfo)
-          {
-             einfo->info.surface = ecore_wl_window_surface_get(wdata->win);
-             evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
-          }
+        /* einfo = (Evas_Engine_Info_Wayland_Egl 
*)evas_engine_info_get(ee->evas); */
+        /* if (einfo) */
+        /*   { */
+        /*      einfo->info.surface = ecore_wl_window_surface_get(wdata->win); 
*/
+        /*      evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
+        /*   } */
 
         if ((ee->prop.clas) && (wdata->win->shell_surface))
           wl_shell_surface_set_class(wdata->win->shell_surface, 

-- 

------------------------------------------------------------------------------
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

Reply via email to