summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland/ecore_wl_window.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-10-16 15:49:30 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-10-16 15:55:40 -0400
commit5ad3c6358f67682816587240a0ff287198549d1a (patch)
tree2d287334b2bc13b0317cfd1d3ca61375c7099f8b /src/lib/ecore_wayland/ecore_wl_window.c
parent07ea62419aa0d871780bf4c3f6e1b0782f9f413a (diff)
Revert "ecore-wayland: Redo window animators to not use Custom source animators"
This reverts commit bd83d4c03ab9f6f6ae225976b9595a1dfde61237. adding an animator (and then not managing its ticks) causes the animator to fire constantly. in this case, it was causing 100% cpu usage and forcing a compositor re-render for every frame regardless of damages
Diffstat (limited to 'src/lib/ecore_wayland/ecore_wl_window.c')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 9f60e884c0..8250e78338 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -16,7 +16,6 @@ static void _ecore_xdg_handle_surface_configure(void *data, struct xdg_surface *
16static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface); 16static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface);
17static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup); 17static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup);
18static void _ecore_session_recovery_uuid(void *data, struct session_recovery *session_recovery, const char *uuid); 18static void _ecore_session_recovery_uuid(void *data, struct session_recovery *session_recovery, const char *uuid);
19static void _anim_cb_animate(void *data, struct wl_callback *callback, uint32_t serial EINA_UNUSED);
20 19
21/* local variables */ 20/* local variables */
22static Eina_Hash *_windows = NULL; 21static Eina_Hash *_windows = NULL;
@@ -45,44 +44,6 @@ static const struct session_recovery_listener _ecore_session_recovery_listener =
45 _ecore_session_recovery_uuid, 44 _ecore_session_recovery_uuid,
46}; 45};
47 46
48static const struct wl_callback_listener _anim_listener =
49{
50 _anim_cb_animate
51};
52
53static void
54_anim_cb_animate(void *data, struct wl_callback *callback, uint32_t serial EINA_UNUSED)
55{
56 Ecore_Wl_Window *win;
57
58 win = data;
59 if (!win) return;
60
61 if ((win->anim_callback) && (callback != win->anim_callback)) return;
62
63 wl_callback_destroy(callback);
64 win->anim_callback = NULL;
65}
66
67static Eina_Bool
68_ecore_wl_window_cb_animate(void *data)
69{
70 Ecore_Wl_Window *win;
71
72 win = data;
73 if (!win->visible) return ECORE_CALLBACK_CANCEL;
74
75 if (!win->anim_callback)
76 {
77 win->anim_callback = wl_surface_frame(win->surface);
78 wl_callback_add_listener(win->anim_callback, &_anim_listener, win);
79 }
80
81 wl_surface_commit(win->surface);
82
83 return ECORE_CALLBACK_RENEW;
84}
85
86/* internal functions */ 47/* internal functions */
87void 48void
88_ecore_wl_window_init(void) 49_ecore_wl_window_init(void)
@@ -444,11 +405,6 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
444 default: 405 default:
445 break; 406 break;
446 } 407 }
447
448 win->visible = EINA_TRUE;
449
450 if (!win->animator)
451 win->animator = ecore_animator_add(_ecore_wl_window_cb_animate, win);
452} 408}
453 409
454EAPI void 410EAPI void
@@ -458,14 +414,6 @@ ecore_wl_window_hide(Ecore_Wl_Window *win)
458 414
459 if (!win) return; 415 if (!win) return;
460 416
461 win->visible = EINA_FALSE;
462
463 if (win->anim_callback) wl_callback_destroy(win->anim_callback);
464 win->anim_callback = NULL;
465
466 if (win->animator) ecore_animator_del(win->animator);
467 win->animator = NULL;
468
469 if (win->xdg_surface) xdg_surface_destroy(win->xdg_surface); 417 if (win->xdg_surface) xdg_surface_destroy(win->xdg_surface);
470 win->xdg_surface = NULL; 418 win->xdg_surface = NULL;
471 419