summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-04-28 13:41:54 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-04-28 16:11:23 -0700
commit23dddfffacaee71a413456c07b7eaf279ef52df3 (patch)
treee9c9391924f92fabd56feb61db4396cd714cb941 /src/lib/ecore_evas
parent1bd82596a698017cbc1bad443a50d720e1d0ae4f (diff)
ecore_evas: do timeout reset on RENDER_POST for future asynchronous rendering.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index b8ab4df739..e2096eddd5 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -178,7 +178,6 @@ _ecore_evas_buffer_render(Ecore_Evas *ee)
178 if (updates) 178 if (updates)
179 { 179 {
180 evas_render_updates_free(updates); 180 evas_render_updates_free(updates);
181 _ecore_evas_idle_timeout_update(ee);
182 } 181 }
183 182
184 if (ee->func.fn_post_render) ee->func.fn_post_render(ee); 183 if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
@@ -190,7 +189,8 @@ static void
190_ecore_evas_buffer_update_image(void *data, Evas *e EINA_UNUSED, void *event_info) 189_ecore_evas_buffer_update_image(void *data, Evas *e EINA_UNUSED, void *event_info)
191{ 190{
192 Evas_Event_Render_Post *post = event_info; 191 Evas_Event_Render_Post *post = event_info;
193 Ecore_Evas_Engine_Buffer_Data *bdata = data; 192 Ecore_Evas *ee = data;
193 Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data;
194 Eina_Rectangle *r; 194 Eina_Rectangle *r;
195 Eina_List *l; 195 Eina_List *l;
196 196
@@ -200,6 +200,12 @@ _ecore_evas_buffer_update_image(void *data, Evas *e EINA_UNUSED, void *event_inf
200 r->x, r->y, r->w, r->h); 200 r->x, r->y, r->w, r->h);
201} 201}
202 202
203static void
204_evas_evas_buffer_rendered(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
205{
206 _ecore_evas_idle_timeout_update(ee);
207}
208
203EAPI int 209EAPI int
204ecore_evas_buffer_render(Ecore_Evas *ee) 210ecore_evas_buffer_render(Ecore_Evas *ee)
205{ 211{
@@ -843,6 +849,8 @@ ecore_evas_buffer_allocfunc_new(int w, int h,
843 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL); 849 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
844 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE); 850 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);
845 851
852 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, _evas_evas_buffer_rendered, ee);
853
846 return ee; 854 return ee;
847} 855}
848 856
@@ -939,7 +947,8 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
939 evas_output_method_set(ee->evas, rmethod); 947 evas_output_method_set(ee->evas, rmethod);
940 evas_output_size_set(ee->evas, w, h); 948 evas_output_size_set(ee->evas, w, h);
941 evas_output_viewport_set(ee->evas, 0, 0, w, h); 949 evas_output_viewport_set(ee->evas, 0, 0, w, h);
942 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, _ecore_evas_buffer_update_image, bdata); 950 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, _ecore_evas_buffer_update_image, ee);
951 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, _evas_evas_buffer_rendered, ee);
943 952
944 bdata->image = o; 953 bdata->image = o;
945 evas_object_data_set(bdata->image, "Ecore_Evas", ee); 954 evas_object_data_set(bdata->image, "Ecore_Evas", ee);