devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=60c7891598d1e2343ff33f3b41e3b426cf0dd034

commit 60c7891598d1e2343ff33f3b41e3b426cf0dd034
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Feb 13 13:37:06 2017 -0500

    ecore-evas-wayland: Fix setting rotation during async render
    
    If we are in async render when a call to set rotation happens, we
    should not be setting the engine info->rotation until we have actually
    handled the rotation. Old code here would set delayed.rotation on the
    ecore_evas itself, but then it would tell the engine to rotate. What
    we actually want here is If in async render, set the delayed rotation
    property and let render_updates deal with any delayed setting.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 .../engines/wayland/ecore_evas_wayland_common.c       | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 5d82867..257ccf2 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -346,11 +346,20 @@ _mouse_move_dispatch(Ecore_Evas *ee)
 static void
 _rotation_do(Ecore_Evas *ee, int rotation, int resize)
 {
+   Evas_Engine_Info_Wayland *einfo;
    Ecore_Evas_Engine_Wl_Data *wdata;
    int rot_dif;
 
    wdata = ee->engine.data;
 
+   einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
+   if (einfo)
+     {
+        einfo->info.rotation = rotation;
+        if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+          ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
+     }
+
    /* calculate difference in rotation */
    rot_dif = ee->rotation - rotation;
    if (rot_dif < 0) rot_dif = -rot_dif;
@@ -1914,8 +1923,6 @@ _ecore_evas_wl_common_transparent_set(Ecore_Evas *ee, int 
transparent)
 void
 _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
 {
-   Evas_Engine_Info_Wayland *einfo;
-
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (ee->rotation == rotation) return;
@@ -1928,14 +1935,6 @@ _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int 
rotation, int resize)
      }
    else
      _rotation_do(ee, rotation, resize);
-
-   einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
-   if (!einfo) return;
-
-   einfo->info.rotation = rotation;
-
-   if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
-     ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
 }
 
 static void

-- 


Reply via email to