summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-08-30 15:47:17 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-09-08 13:55:23 -0500
commit398771bf8afb0399184854b87b30b4a58c1d2aa3 (patch)
tree8b5647cc426dad0aa85abfba4cceb7117ea38945 /src
parent1591e095d5e834a67bd270019068c6b6edf6bfba (diff)
evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM engine we need to know as soon as possible that a render has been after a render has been considered if it will cause a page flip or not. The fn_evas_changed callback sends this information.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c7
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c2
-rw-r--r--src/lib/ecore_evas/ecore_evas_ews.c2
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h2
-rw-r--r--src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c4
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c4
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn.c6
-rw-r--r--src/modules/ecore_evas/engines/fb/ecore_evas_fb.c4
-rw-r--r--src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c4
-rw-r--r--src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c4
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c4
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c4
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c4
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c4
14 files changed, 45 insertions, 10 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 769855d6ea..72e46992cd 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -175,6 +175,13 @@ _ecore_evas_idle_enter(void *data EINA_UNUSED)
175 { 175 {
176 if (ee->engine.func->fn_render) 176 if (ee->engine.func->fn_render)
177 rend |= ee->engine.func->fn_render(ee); 177 rend |= ee->engine.func->fn_render(ee);
178 /*
179 * Some engines that generate their own ticks based on hardware
180 * events need to know that render has been considered, and
181 * whether it will actually generate a new image or not
182 */
183 if (ee->engine.func->fn_evas_changed)
184 ee->engine.func->fn_evas_changed(ee, rend);
178 } 185 }
179#ifdef ECORE_EVAS_ASYNC_RENDER_DEBUG 186#ifdef ECORE_EVAS_ASYNC_RENDER_DEBUG
180 if ((ee->in_async_render) && (ee->async_render_start <= 0.0)) 187 if ((ee->in_async_render) && (ee->async_render_start <= 0.0))
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index 795f5b77fc..deb2387001 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -606,6 +606,8 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
606 606
607 NULL, // fn_animator_register 607 NULL, // fn_animator_register
608 NULL, // fn_animator_unregister 608 NULL, // fn_animator_unregister
609
610 NULL, // fn_evas_changed
609}; 611};
610 612
611static void * 613static void *
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c
index 904c5043fb..6f90654f6b 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -719,6 +719,8 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
719 719
720 NULL, // fn_animator_register 720 NULL, // fn_animator_register
721 NULL, // fn_animator_unregister 721 NULL, // fn_animator_unregister
722
723 NULL, // fn_evas_changed
722}; 724};
723 725
724void 726void
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 4eaa3696b7..ee75fd0782 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -156,6 +156,8 @@ struct _Ecore_Evas_Engine_Func
156 156
157 void (*fn_animator_register) (Ecore_Evas *ee); 157 void (*fn_animator_register) (Ecore_Evas *ee);
158 void (*fn_animator_unregister)(Ecore_Evas *ee); 158 void (*fn_animator_unregister)(Ecore_Evas *ee);
159
160 void (*fn_evas_changed)(Ecore_Evas *ee, Eina_Bool changed);
159}; 161};
160 162
161struct _Ecore_Evas_Interface 163struct _Ecore_Evas_Interface
diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
index 0624212cc8..98dca01082 100644
--- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
+++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
@@ -673,7 +673,9 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
673 673
674 NULL, // fn_aux_hints_set 674 NULL, // fn_aux_hints_set
675 NULL, // fn_animator_register 675 NULL, // fn_animator_register
676 NULL // fn_animator_unregister 676 NULL, // fn_animator_unregister
677
678 NULL, // fn_evas_changed
677 }; 679 };
678 680
679static Ecore_Cocoa_Window * 681static Ecore_Cocoa_Window *
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 0ba89685cc..59278aa4f2 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -663,7 +663,9 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
663 NULL, // aux_hints_set 663 NULL, // aux_hints_set
664 664
665 NULL, // animator_register 665 NULL, // animator_register
666 NULL // animator_unregister 666 NULL, // animator_unregister
667
668 NULL // evas_changed
667}; 669};
668 670
669EAPI Ecore_Evas * 671EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index d705df3ee1..785f9cd0f4 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -913,7 +913,9 @@ static const Ecore_Evas_Engine_Func _ecore_extn_plug_engine_func =
913 NULL, // aux_hints_set 913 NULL, // aux_hints_set
914 914
915 NULL, // fn_animator_register 915 NULL, // fn_animator_register
916 NULL // fn_animator_unregister 916 NULL, // fn_animator_unregister
917
918 NULL, // fn_evas_changed
917}; 919};
918 920
919static Eina_Bool 921static Eina_Bool
@@ -2078,6 +2080,8 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func =
2078 2080
2079 NULL, // fn_animator_register 2081 NULL, // fn_animator_register
2080 NULL, // fn_animator_unregister 2082 NULL, // fn_animator_unregister
2083
2084 NULL, // fn_evas_changed
2081}; 2085};
2082 2086
2083EAPI Ecore_Evas * 2087EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index 3ab06bb40e..558f82f752 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -641,7 +641,9 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
641 NULL, // aux_hints_set 641 NULL, // aux_hints_set
642 642
643 NULL, // fn_animator_register 643 NULL, // fn_animator_register
644 NULL // fn_animator_unregister 644 NULL, // fn_animator_unregister
645
646 NULL, // fn_evas_changed
645}; 647};
646 648
647EAPI Ecore_Evas * 649EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
index bd34e19fd1..7938dce2e5 100644
--- a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
+++ b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
@@ -463,7 +463,9 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func =
463 NULL, // aux_hints_set 463 NULL, // aux_hints_set
464 464
465 NULL, // fn_animator_register 465 NULL, // fn_animator_register
466 NULL // fn_animator_unregister 466 NULL, // fn_animator_unregister
467
468 NULL, // fn_evas_changed
467}; 469};
468 470
469EAPI Ecore_Evas * 471EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
index 9515e93a50..2382fdac44 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -552,7 +552,9 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
552 NULL, // aux_hints_set 552 NULL, // aux_hints_set
553 553
554 NULL, // fn_animator_register 554 NULL, // fn_animator_register
555 NULL // fn_animator_unregister 555 NULL, // fn_animator_unregister
556
557 NULL, // fn_evas_changed
556}; 558};
557 559
558static Ecore_Evas* 560static Ecore_Evas*
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index c02619d010..305b095cea 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -115,7 +115,9 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
115 NULL, // aux_hints_set 115 NULL, // aux_hints_set
116 116
117 NULL, // fn_animator_register 117 NULL, // fn_animator_register
118 NULL // fn_animator_unregister 118 NULL, // fn_animator_unregister
119
120 NULL, // fn_evas_changed
119}; 121};
120 122
121/* external variables */ 123/* external variables */
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 5f55b63bd4..4b3b492104 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
@@ -112,7 +112,9 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
112 NULL, // aux_hints_set 112 NULL, // aux_hints_set
113 113
114 NULL, // fn_animator_register 114 NULL, // fn_animator_register
115 NULL // fn_animator_unregister 115 NULL, // fn_animator_unregister
116
117 NULL, // fn_evas_changed
116}; 118};
117 119
118/* external variables */ 120/* external variables */
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index 0ac7017c6b..1187d5dba2 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -1203,7 +1203,9 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
1203 NULL, // aux_hints_set 1203 NULL, // aux_hints_set
1204 1204
1205 NULL, // fn_animator_register 1205 NULL, // fn_animator_register
1206 NULL // fn_animator_unregister 1206 NULL, // fn_animator_unregister
1207
1208 NULL, // fn_evas_changed
1207}; 1209};
1208 1210
1209#endif /* BUILD_ECORE_EVAS_WIN32 */ 1211#endif /* BUILD_ECORE_EVAS_WIN32 */
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index a8226bd099..e3bfaa89f9 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -3744,7 +3744,9 @@ static Ecore_Evas_Engine_Func _ecore_x_engine_func =
3744 _ecore_evas_x_aux_hints_set, 3744 _ecore_evas_x_aux_hints_set,
3745 3745
3746 NULL, // fn_animator_register 3746 NULL, // fn_animator_register
3747 NULL // fn_animator_unregister 3747 NULL, // fn_animator_unregister
3748
3749 NULL, // fn_evas_changed
3748}; 3750};
3749 3751
3750/* 3752/*