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.
This commit is contained in:
Derek Foreman 2017-06-15 13:02:21 -05:00
parent a97b1ac006
commit 4d058ad323
1 changed files with 7 additions and 7 deletions

View File

@ -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); */