From 794d077c6b3ba6a978349e157c3c292ceb7cda68 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Mon, 29 Nov 2010 10:19:35 +0900 Subject: [PATCH] [ecore_evas] Patch code for rotation. --- debian/changelog | 8 +++++ src/lib/ecore_evas/ecore_evas_x.c | 74 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/debian/changelog b/debian/changelog index 70c4a6e..cda9272 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ecore (1.0.0.001+svn.51480slp2+build28) unstable; urgency=low + + * [ecore_evas] Patch code for rotation. + * Git: 165.213.180.234:/git/slp/pkgs/ecore + * Tag: ecore_1.0.0.001+svn.51480slp2+build28 + + -- Doyoun Kang Mon, 29 Nov 2010 10:14:56 +0900 + ecore (1.0.0.001+svn.51480slp2+build27) unstable; urgency=low * [ecore_evas.c] change FPS rate print it every 0.1 sec diff --git a/src/lib/ecore_evas/ecore_evas_x.c b/src/lib/ecore_evas/ecore_evas_x.c index 1cb168c..bfa5195 100644 --- a/src/lib/ecore_evas/ecore_evas_x.c +++ b/src/lib/ecore_evas/ecore_evas_x.c @@ -1567,11 +1567,44 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize, } } +/* added by gl77.lee 101001 - for EFL rotation effect */ +#define _USE_WIN_ROT_EFFECT 1 + +#if _USE_WIN_ROT_EFFECT +static void _ecore_evas_x_flush_pre(void *data, Evas *e __UNUSED__, void *event_info __UNUSED__); + +typedef struct _Ecore_Evas_X_Rotation_Effect Ecore_Evas_X_Rotation_Effect; +struct _Ecore_Evas_X_Rotation_Effect +{ + Eina_Bool wait_for_comp_reply; +}; + +static Ecore_Evas_X_Rotation_Effect _rot_effect = +{ + EINA_FALSE +}; + +static void +_ecore_evas_x_rotation_effect_setup(void) +{ + _rot_effect.wait_for_comp_reply = EINA_TRUE; +} +#endif /* end of _USE_WIN_ROT_EFFECT */ + + + static void _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) { if (ee->rotation == rotation) return; if (!strcmp(ee->driver, "xrender_x11")) return; + + #if _USE_WIN_ROT_EFFECT + int angles[2]; + angles[0] = rotation; + angles[1] = ee->rotation; + #endif /* end of _USE_WIN_ROT_EFFECT */ + if (!strcmp(ee->driver, "opengl_x11")) { #ifdef BUILD_ECORE_EVAS_OPENGL_X11 @@ -1582,6 +1615,18 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal (ee, rotation, resize, (Evas_Engine_Info *)einfo); + + /* added by doyoun.kang 100218 - for rotation */ + #if _USE_WIN_ROT_EFFECT + ecore_x_window_prop_property_set (ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); + #else + ecore_x_window_prop_property_set (ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &rotation, 1); + #endif + #endif /* BUILD_ECORE_EVAS_OPENGL_X11 */ } else if (!strcmp(ee->driver, "software_x11")) @@ -1594,6 +1639,18 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal (ee, rotation, resize, (Evas_Engine_Info *)einfo); + + /* added by doyoun.kang 100218 - for rotation */ + #if _USE_WIN_ROT_EFFECT + ecore_x_window_prop_property_set (ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); + #else + ecore_x_window_prop_property_set (ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &rotation, 1); + #endif + #endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */ } else if (!strcmp(ee->driver, "software_16_x11")) @@ -1606,6 +1663,18 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal (ee, rotation, resize, (Evas_Engine_Info *)einfo); + + /* added by doyoun.kang 100218 - for rotation */ + #if _USE_WIN_ROT_EFFECT + ecore_x_window_prop_property_set (ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); + #else + ecore_x_window_prop_property_set (ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &rotation, 1); + #endif + #endif /* BUILD_ECORE_EVAS_SOFTWARE_16_X11 */ } else if (!strcmp(ee->driver, "software_8_x11")) @@ -1620,6 +1689,11 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) (ee, rotation, resize, (Evas_Engine_Info *)einfo); #endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */ } + + #if _USE_WIN_ROT_EFFECT + _ecore_evas_x_rotation_effect_setup(); + _ecore_evas_x_flush_pre(ee, NULL, NULL); + #endif /* end of _USE_WIN_ROT_EFFECT */ } static void -- 2.7.4