From 4d058ad3230c520d8a09614a109909cb6195330c Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 15 Jun 2017 13:02:21 -0500 Subject: [PATCH] gl_drm ee: Move to new per fb status callbacks Switch over to the per fb status callbacks as the old per output api is about to be removed. --- src/modules/evas/engines/gl_drm/evas_outbuf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c index 63cdb07..69fe64c 100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@ -45,12 +45,14 @@ _evas_outbuf_fb_cb_destroy(struct gbm_bo *bo EINA_UNUSED, void *data) } void -_evas_outbuf_release_fb(void *ob_v, Ecore_Drm2_Fb *fb) - { +_evas_outbuf_release_fb(Ecore_Drm2_Fb *fb, Ecore_Drm2_Fb_Status status, void *data) +{ struct gbm_bo *bo; Outbuf *ob; - ob = ob_v; + if (status != ECORE_DRM2_FB_STATUS_RELEASE) return; + + ob = data; bo = ecore_drm2_fb_bo_get(fb); gbm_surface_release_buffer(ob->surface, bo); } @@ -81,6 +83,8 @@ _evas_outbuf_fb_get(Outbuf *ob, struct gbm_bo *bo) return NULL; } + ecore_drm2_fb_status_handler_set(fb, _evas_outbuf_release_fb, ob); + gbm_bo_set_user_data(bo, fb, _evas_outbuf_fb_cb_destroy); return fb; @@ -400,10 +404,6 @@ evas_outbuf_new(Evas_Engine_Info_GL_Drm *info, int w, int h, Render_Engine_Swap_ ob->format = info->info.format; ob->priv.output = info->info.output; - ecore_drm2_output_release_handler_set(ob->priv.output, - _evas_outbuf_release_fb, - ob); - /* if ((num = getenv("EVAS_GL_DRM_VSYNC"))) */ /* ob->vsync = atoi(num); */ -- 2.7.4