devilhorns pushed a commit to branch master.

commit d65c357b398d3e0397a9282af6c55e24c6dbde4a
Author: Chris Michael <[email protected]>
Date:   Thu Jul 25 15:48:40 2013 +0100

    During a call to ecore_evas_show (using wayland_shm), we can avoid
    erroneous calls to engine_setup code if we check surface validity.
    
    NB: Short Version: Don't reassign surface if we don't need to.
    
    NB: Prior to this, during a call to ecore_evas_show we would always
    Reset the evas engine data (which was basically triggering code to
    tear down and reconstruct all the engine internals including the
    buffers and the swapper). By checking surface validity first, we can
    potentially avoid all that teardown and reconstruction Thus resulting
    in faster "show" speed.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 .../ecore_evas/engines/wayland/ecore_evas_wayland_shm.c       | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 048d2c7..467030f 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -394,9 +394,14 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
         einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas);
         if (einfo)
           {
-             einfo->info.wl_shm = ecore_wl_shm_get();
-             einfo->info.wl_surface = ecore_wl_window_surface_get(wdata->win);
-             evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+             struct wl_surface *surf;
+
+             surf = ecore_wl_window_surface_get(wdata->win);
+             if ((!einfo->info.wl_surface) || (einfo->info.wl_surface != surf))
+               {
+                  einfo->info.wl_surface = surf;
+                  evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+               }
           }
 
         if ((ee->prop.clas) && (wdata->win->shell_surface))

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to