summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-08-06 09:52:16 -0400
committerChris Michael <cp.michael@samsung.com>2015-08-06 09:53:27 -0400
commitf8987ed5aa6794244fb71cfaf5cc48149a2f0274 (patch)
tree11d66f0003bbd2e9f2d132af59b670f26a75741b
parent79f2576a8919c288f51939b12cc4edfd67023c17 (diff)
Add experimental implementation of custom animator ticks
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wayland/ecore_wl.c5
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c2
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c30
4 files changed, 23 insertions, 16 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index fff8dd6de3..125082b066 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -779,6 +779,8 @@ _ecore_wl_animator_tick_cb_begin(void *data EINA_UNUSED)
779{ 779{
780 Eina_Hash *windows; 780 Eina_Hash *windows;
781 781
782 fprintf(stderr, "ECORE_WL ANIMATOR TICK BEGIN\n");
783
782 _ecore_wl_animator_busy = EINA_TRUE; 784 _ecore_wl_animator_busy = EINA_TRUE;
783 785
784 windows = _ecore_wl_window_hash_get(); 786 windows = _ecore_wl_window_hash_get();
@@ -788,6 +790,7 @@ _ecore_wl_animator_tick_cb_begin(void *data EINA_UNUSED)
788static void 790static void
789_ecore_wl_animator_tick_cb_end(void *data EINA_UNUSED) 791_ecore_wl_animator_tick_cb_end(void *data EINA_UNUSED)
790{ 792{
793 fprintf(stderr, "ECORE_WL ANIMATOR TICK END\n");
791 _ecore_wl_animator_busy = EINA_FALSE; 794 _ecore_wl_animator_busy = EINA_FALSE;
792} 795}
793 796
@@ -798,6 +801,8 @@ _ecore_wl_animator_callback(void *data, struct wl_callback *callback, uint32_t s
798 801
799 if (!(win = data)) return; 802 if (!(win = data)) return;
800 803
804 fprintf(stderr, "ECORE_WL ANIMATOR CALLBACK\n");
805
801 ecore_animator_custom_tick(); 806 ecore_animator_custom_tick();
802 807
803 wl_callback_destroy(callback); 808 wl_callback_destroy(callback);
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index ab3f28d3bd..c2055c17af 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -231,7 +231,7 @@ ecore_wl_window_commit(Ecore_Wl_Window *win)
231 231
232 if (!win) return; 232 if (!win) return;
233 233
234 if ((win->surface) && (win->has_buffer)) 234 if ((win->surface))// && (win->has_buffer))
235 wl_surface_commit(win->surface); 235 wl_surface_commit(win->surface);
236} 236}
237 237
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 420e5953de..d9b2894666 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
@@ -245,6 +245,8 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
245 goto err; 245 goto err;
246 } 246 }
247 247
248 ecore_wl_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM);
249
248 ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_common_pre_free); 250 ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_common_pre_free);
249 251
250 if (ee->prop.draw_frame) 252 if (ee->prop.draw_frame)
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 1d8f594e21..1e730a4e72 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -134,22 +134,22 @@ _shm_pool_reset(Shm_Pool *pool)
134 pool->used = 0; 134 pool->used = 0;
135} 135}
136 136
137static void 137/* static void */
138_shm_frame_release(void *data, struct wl_callback *callback, uint32_t timestamp EINA_UNUSED) 138/* _shm_frame_release(void *data, struct wl_callback *callback, uint32_t timestamp EINA_UNUSED) */
139{ 139/* { */
140 Shm_Surface *surf; 140/* Shm_Surface *surf; */
141 141
142 LOGFN(__FILE__, __LINE__, __FUNCTION__); 142/* LOGFN(__FILE__, __LINE__, __FUNCTION__); */
143 143
144 if (!(surf = data)) return; 144/* if (!(surf = data)) return; */
145 145
146 wl_callback_destroy(callback); 146/* wl_callback_destroy(callback); */
147} 147/* } */
148 148
149static const struct wl_callback_listener _shm_frame_listener = 149/* static const struct wl_callback_listener _shm_frame_listener = */
150{ 150/* { */
151 _shm_frame_release 151/* _shm_frame_release */
152}; 152/* }; */
153 153
154static Shm_Data * 154static Shm_Data *
155_shm_data_create_from_pool(Shm_Pool *pool, int w, int h, Eina_Bool alpha) 155_shm_data_create_from_pool(Shm_Pool *pool, int w, int h, Eina_Bool alpha)
@@ -488,7 +488,7 @@ _evas_shm_surface_data_get(Shm_Surface *surface, int *w, int *h)
488void 488void
489_evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int count) 489_evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int count)
490{ 490{
491 struct wl_callback *frame_cb; 491 /* struct wl_callback *frame_cb; */
492 Shm_Leaf *leaf; 492 Shm_Leaf *leaf;
493 493
494 LOGFN(__FILE__, __LINE__, __FUNCTION__); 494 LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -512,8 +512,8 @@ _evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int
512 else 512 else
513 wl_surface_damage(surface->surface, 0, 0, leaf->w, leaf->h); 513 wl_surface_damage(surface->surface, 0, 0, leaf->w, leaf->h);
514 514
515 frame_cb = wl_surface_frame(surface->surface); 515 /* frame_cb = wl_surface_frame(surface->surface); */
516 wl_callback_add_listener(frame_cb, &_shm_frame_listener, surface); 516 /* wl_callback_add_listener(frame_cb, &_shm_frame_listener, surface); */
517 517
518 wl_surface_commit(surface->surface); 518 wl_surface_commit(surface->surface);
519 519