summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-07-12 16:30:07 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-07-13 18:07:42 -0500
commite53b0c262ad27118c3f3b8aa57d02a47a50f5aa8 (patch)
treeae67aeb7ee3762f7a01052787dc8fb2180a21694 /src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
parentaa8d9c1829f65c4fe0bb79a73e49f56c0aa2b92f (diff)
ecore_evas_drm: Provide a last_tick_get callback
Allow the drm engine to provide a tick timestamp for the previous vblank interval. ref T5462
Diffstat (limited to '')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c15
1 files changed, 14 insertions, 1 deletions
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 96d0c27656..dd46ce00d0 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -673,6 +673,19 @@ _drm_animator_unregister(Ecore_Evas *ee)
673 edata->ticking = EINA_FALSE; 673 edata->ticking = EINA_FALSE;
674} 674}
675 675
676static double
677_drm_last_tick_get(Ecore_Evas *ee)
678{
679 Ecore_Evas_Engine_Drm_Data *edata;
680 long sec, usec;
681
682 edata = ee->engine.data;
683 if (!ecore_drm2_output_blanktime_get(edata->output, &sec, &usec))
684 return -1.0;
685
686 return sec + usec / 1000000.0;
687}
688
676static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func = 689static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
677{ 690{
678 _drm_free, 691 _drm_free,
@@ -760,7 +773,7 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
760 NULL, //fn_callback_device_mouse_out_set 773 NULL, //fn_callback_device_mouse_out_set
761 NULL, //fn_pointer_device_xy_get 774 NULL, //fn_pointer_device_xy_get
762 NULL, //fn_prepare 775 NULL, //fn_prepare
763 NULL, //fn_last_tick_get 776 _drm_last_tick_get,
764}; 777};
765 778
766static Ecore_Evas * 779static Ecore_Evas *