derekf pushed a commit to branch master.

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

commit b23797c55a605daf843aba972d489023fa7e916f
Author: Derek Foreman <[email protected]>
Date:   Tue Nov 1 17:16:07 2016 -0500

    ecore_evas_wayland: Make rotation_set common
    
    Rotation set can be moved into common now - should be no functional
    change.
---
 .../engines/wayland/ecore_evas_wayland_common.c    | 40 +++++++++++++++-------
 .../engines/wayland/ecore_evas_wayland_egl.c       | 25 +-------------
 .../engines/wayland/ecore_evas_wayland_shm.c       | 25 +-------------
 3 files changed, 29 insertions(+), 61 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 63a3cd3..80b1ff9 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
@@ -397,19 +397,6 @@ _rotation_do(Ecore_Evas *ee, int rotation, int resize)
      }
 }
 
-void
-_ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
-{
-   if (ee->in_async_render)
-     {
-        ee->delayed.rotation = rotation;
-        ee->delayed.rotation_resize = resize;
-        ee->delayed.rotation_changed = EINA_TRUE;
-        return;
-     }
-   _rotation_do(ee, rotation, resize);
-}
-
 static Eina_Bool
 _ecore_evas_wl_common_cb_www_drag(void *d EINA_UNUSED, int t EINA_UNUSED, void 
*event)
 {
@@ -2066,3 +2053,30 @@ _ecore_evas_wl_common_transparent_set(Ecore_Evas *ee, 
int transparent)
 
    _ecore_evas_wayland_transparent_do(ee, 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;
+
+   if (ee->in_async_render)
+     {
+        ee->delayed.rotation = rotation;
+        ee->delayed.rotation_resize = resize;
+        ee->delayed.rotation_changed = EINA_TRUE;
+     }
+   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);
+}
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 56799c6..366c7d2 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
@@ -33,9 +33,6 @@
 extern EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
 extern EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
 
-/* local function prototypes */
-static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int 
resize);
-
 static Ecore_Evas_Engine_Func _ecore_wl_engine_func = 
 {
    _ecore_evas_wl_common_free,
@@ -57,7 +54,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    NULL, // managed_move
    _ecore_evas_wl_common_resize,
    _ecore_evas_wl_common_move_resize,
-   _ecore_evas_wl_rotation_set,
+   _ecore_evas_wl_common_rotation_set,
    NULL, // shaped_set
    _ecore_evas_wl_common_show,
    _ecore_evas_wl_common_hide,
@@ -445,26 +442,6 @@ conn_err:
    return NULL;
 }
 
-static void
-_ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize)
-{
-   Evas_Engine_Info_Wayland *einfo;
-
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
-   if (ee->rotation == rotation) return;
-
-   _ecore_evas_wl_common_rotation_set(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);
-}
-
 void 
 _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
 {
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 cc9b6b1..662912a 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
@@ -30,9 +30,6 @@
 # endif
 #endif /* ! _WIN32 */
 
-/* local function prototypes */
-static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int 
resize);
-
 static Ecore_Evas_Engine_Func _ecore_wl_engine_func = 
 {
    _ecore_evas_wl_common_free,
@@ -54,7 +51,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    NULL, // managed_move
    _ecore_evas_wl_common_resize,
    _ecore_evas_wl_common_move_resize,
-   _ecore_evas_wl_rotation_set,
+   _ecore_evas_wl_common_rotation_set,
    NULL, // shaped_set
    _ecore_evas_wl_common_show,
    _ecore_evas_wl_common_hide,
@@ -374,26 +371,6 @@ conn_err:
    return NULL;
 }
 
-static void
-_ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize)
-{
-   Evas_Engine_Info_Wayland *einfo;
-
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
-   if (ee->rotation == rotation) return;
-
-   _ecore_evas_wl_common_rotation_set(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);
-}
-
 void 
 _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
 {

-- 


Reply via email to