aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-10 15:58:16 -0600
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-15 13:47:17 -0600
commitbe3020b0ab53121757c11daefc22a2c575c8cf3d (patch)
tree7149e8050d0220ca5f83ade6ba068e42d2ae865a
parentecore_evas: Don't walk mice list twice (diff)
downloadefl-be3020b0ab53121757c11daefc22a2c575c8cf3d.tar.gz
ecore_wl2: Convert frame callbacks to inlist
They're only ever on a single list, and never counted. inlist makes more sense. Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com> Reviewed-by: Chris Michael <cp.michael@samsung.com> Differential Revision: https://phab.enlightenment.org/D7610
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h3
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 1ac9b44808..e62ea5f8ea 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -147,6 +147,7 @@ struct _Ecore_Wl2_Aux_Hint
struct _Ecore_Wl2_Frame_Cb_Handle
{
+ EINA_INLIST;
Ecore_Wl2_Window *win;
Ecore_Wl2_Frame_Cb cb;
void *data;
@@ -221,7 +222,7 @@ struct _Ecore_Wl2_Window
Eina_Inlist *subsurfs;
Eina_List *supported_aux_hints;
- Eina_List *frame_callbacks;
+ Eina_Inlist *frame_callbacks;
Eina_List *outputs;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 0a61e596ab..71c74f3284 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1418,13 +1418,13 @@ _frame_cb(void *data, struct wl_callback *callback, uint32_t timestamp)
{
Ecore_Wl2_Frame_Cb_Handle *cb;
Ecore_Wl2_Window *window;
- Eina_List *l, *ll;
+ Eina_Inlist *l;
window = data;
window->commit_pending = EINA_FALSE;
wl_callback_destroy(callback);
window->callback = NULL;
- EINA_LIST_FOREACH_SAFE(window->frame_callbacks, l, ll, cb)
+ EINA_INLIST_FOREACH_SAFE(window->frame_callbacks, l, cb)
cb->cb(window, timestamp, cb->data);
}
@@ -1652,7 +1652,7 @@ ecore_wl2_window_frame_callback_add(Ecore_Wl2_Window *window, Ecore_Wl2_Frame_Cb
callback->data = data;
callback->win = window;
window->frame_callbacks =
- eina_list_append(window->frame_callbacks, callback);
+ eina_inlist_append(window->frame_callbacks, EINA_INLIST_GET(callback));
return callback;
}
@@ -1662,7 +1662,7 @@ ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle)
EINA_SAFETY_ON_NULL_RETURN(handle);
handle->win->frame_callbacks =
- eina_list_remove(handle->win->frame_callbacks, handle);
+ eina_inlist_remove(handle->win->frame_callbacks, EINA_INLIST_GET(handle));
free(handle);
}