devilhorns pushed a commit to branch feature/wayland/multioutput.

http://git.enlightenment.org/core/efl.git/commit/?id=fa7c095adf3cf2f21bb51809720ae51badebca4c

commit fa7c095adf3cf2f21bb51809720ae51badebca4c
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Mar 29 09:17:52 2018 -0400

    ecore-evas-drm: Add support for per-output ticking
    
    This patch modifies the ecore_evas animator ticking code for drm in
    order to support ticks on a per-output basis
---
 src/lib/ecore_drm2/ecore_drm2_fb.c                 |  3 +-
 .../ecore_evas/engines/drm/ecore_evas_drm.c        | 42 ++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c 
b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 500e46d6eb..28596b51f4 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -503,7 +503,8 @@ _fb_flip(Ecore_Drm2_Output *output)
 
         repeat = EINA_FALSE;
         ret = sym_drmModePageFlip(fb->fd, output->crtc_id, fb->id,
-                                  DRM_MODE_PAGE_FLIP_EVENT, output);
+                                  DRM_MODE_PAGE_FLIP_EVENT,
+                                  output);
 
         /* Some drivers (RPI - looking at you) are broken and produce
          * flip events before they are ready for another flip, so be
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 5c413609b7..166cd85f90 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -854,6 +854,7 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame 
EINA_UNUSED, unsigned int se
    if (edata->ticking)
      {
         Ecore_Evas_Engine_Drm_Tick *etick;
+<<<<<<< HEAD
 
         etick = _drm_tick_find(edata, output);
         if (etick)
@@ -863,6 +864,17 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame 
EINA_UNUSED, unsigned int se
 
              ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL);
 
+=======
+
+        etick = _drm_tick_find(edata, output);
+        if (etick)
+          {
+             int x, y, w, h;
+             double t = (double)sec + ((double)usec / 1000000);
+
+             ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL);
+
+>>>>>>> ff44c6859b... ecore-evas-drm: Add support for per-output ticking
              if (!edata->once) t = ecore_time_get();
              ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h},
                                       t - etick->offset);
@@ -1034,6 +1046,35 @@ _drm_last_tick_get(Ecore_Evas *ee)
    Eina_List *l;
    long sec, usec;
    double tmp = -1.0;
+<<<<<<< HEAD
+
+   edata = ee->engine.data;
+
+   EINA_LIST_FOREACH(edata->outputs, l, output)
+     {
+        if (ecore_drm2_output_blanktime_get(output, 0, &sec, &usec))
+          {
+             if ((sec + usec / 1000000.0) > tmp)
+               tmp = sec + usec / 1000000.0;
+          }
+     }
+
+   return tmp;
+}
+
+static Eina_Bool
+_drm_output_clone_set(const Ecore_Evas *ee, void *output, void *clone)
+{
+   Ecore_Evas_Engine_Drm_Data *edata;
+   Ecore_Drm2_Output *out, *cout;
+   Ecore_Evas_Engine_Drm_Tick *etick;
+   Evas_Engine_Info_Drm *einfo;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+
+   edata = ee->engine.data;
+
+=======
 
    edata = ee->engine.data;
 
@@ -1061,6 +1102,7 @@ _drm_output_clone_set(const Ecore_Evas *ee, void *output, 
void *clone)
 
    edata = ee->engine.data;
 
+>>>>>>> ff44c6859b... ecore-evas-drm: Add support for per-output ticking
    out = (Ecore_Drm2_Output *)output;
    cout = (Ecore_Drm2_Output *)clone;
 

-- 


Reply via email to