[client] egl: re-implement DMABUF (untested)

This commit is contained in:
Geoffrey McRae
2021-08-03 03:58:30 +10:00
parent bae19cb130
commit f3413815a9
7 changed files with 249 additions and 70 deletions

View File

@@ -149,6 +149,10 @@ static int renderThread(void * unused)
return 1;
}
if (g_state.lgr->supports &&
!g_state.lgr->supports(g_state.lgrData, LG_SUPPORTS_DMABUF))
g_state.useDMA = false;
/* start up the fps timer */
LGTimer * fpsTimer;
if (!lgCreateTimer(500, fpsTimerFn, NULL, &fpsTimer))
@@ -925,18 +929,16 @@ static int lg_run(void)
}
}
g_state.useDMA =
g_params.allowDMA &&
ivshmemHasDMA(&g_state.shm) &&
g_state.lgr->supports &&
g_state.lgr->supports(g_state.lgrData, LG_SUPPORTS_DMABUF);
if (!g_state.lgr)
{
DEBUG_INFO("Unable to find a suitable renderer");
return -1;
}
g_state.useDMA =
g_params.allowDMA &&
ivshmemHasDMA(&g_state.shm);
// initialize the window dimensions at init for renderers
g_state.windowW = g_params.w;
g_state.windowH = g_params.h;