summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-01-02 11:05:07 -0500
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-17 09:37:33 -0600
commit8079d6d38a455dc548482353ff739cac82fdfc23 (patch)
tree8b010a20fa147a3a43ceaec34b44e09ae2a671e1 /src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
parent1b7129cea0d90f76a21bd6b4e40d1528141e087f (diff)
ecore-drm2: Pass output as data to drmModePageFlip and drmModeAtomicCommit
In order to support per-output ticking, the drmModePageFlip and drmModeAtomicCommit functions need to pass the actual Output as data to the pageflip callback so that the pageflip callback function can pass the proper rectangle to ecore_evas_animator_tick Differential Revision: https://phab.enlightenment.org/D7678
Diffstat (limited to 'src/modules/ecore_evas/engines/drm/ecore_evas_drm.c')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c13
1 files changed, 9 insertions, 4 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 794cf841fd..4e25542c39 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -718,27 +718,32 @@ static void
718_cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec, unsigned int usec, void *data) 718_cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec, unsigned int usec, void *data)
719{ 719{
720 Ecore_Evas *ee; 720 Ecore_Evas *ee;
721 Ecore_Drm2_Output *output;
721 Ecore_Evas_Engine_Drm_Data *edata; 722 Ecore_Evas_Engine_Drm_Data *edata;
722 int ret; 723 int ret;
723 724
724 ee = data; 725 output = data;
726
727 ee = ecore_drm2_output_user_data_get(output);
728 if (!ee) return;
729
725 edata = ee->engine.data; 730 edata = ee->engine.data;
726 731
727 ret = ecore_drm2_fb_flip_complete(edata->output); 732 ret = ecore_drm2_fb_flip_complete(output);
728 733
729 if (edata->ticking) 734 if (edata->ticking)
730 { 735 {
731 int x, y, w, h; 736 int x, y, w, h;
732 double t = (double)sec + ((double)usec / 1000000); 737 double t = (double)sec + ((double)usec / 1000000);
733 738
734 ecore_drm2_output_info_get(edata->output, &x, &y, &w, &h, NULL); 739 ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL);
735 740
736 if (!edata->once) t = ecore_time_get(); 741 if (!edata->once) t = ecore_time_get();
737 ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h}, 742 ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h},
738 t - edata->offset); 743 t - edata->offset);
739 } 744 }
740 else if (ret) 745 else if (ret)
741 ecore_drm2_fb_flip(NULL, edata->output); 746 ecore_drm2_fb_flip(NULL, output);
742} 747}
743 748
744static void 749static void