int
tbm_backend_bufmgr_query_display_server(tbm_bufmgr bufmgr, tbm_error_e *error)
{
+ const char *value;
+
if (!bufmgr) {
if (error)
*error = TBM_ERROR_INVALID_PARAMETER;
return 0;
}
- if (gBufMgr->display_server) {
+ /* TODO: TBM_DISPLAY_SERVER will be removed */
+ value = (const char*)getenv("TBM_DISPLAY_SERVER");
+
+ if (value || gBufMgr->display_server) {
if (error)
*error = TBM_ERROR_NONE;
return 1;
TBM_RETURN_VAL_IF_FAIL(bufmgr, TBM_ERROR_INVALID_PARAMETER);
TBM_RETURN_VAL_IF_FAIL(func, TBM_ERROR_INVALID_PARAMETER);
- bufmgr->bufmgr_func = func;
+ // The tbm_bufmgr from backend module is actually tbm_module memory in libtbm.
+ // libtbm initializes module init with this tbm_module which is casted with tbm_bufmgr.
+ tbm_module *module = (tbm_module *)bufmgr;
+ module->bufmgr_func = func;
return TBM_ERROR_NONE;
}
TBM_RETURN_VAL_IF_FAIL(bufmgr, TBM_ERROR_INVALID_PARAMETER);
TBM_RETURN_VAL_IF_FAIL(func, TBM_ERROR_INVALID_PARAMETER);
- bufmgr->bo_func = func;
+ // The tbm_bufmgr from backend module is actually tbm_module memory in libtbm.
+ // libtbm initializes module init with this tbm_module which is casted with tbm_bufmgr.
+ tbm_module *module = (tbm_module *)bufmgr;
+ module->bo_func = func;
return TBM_ERROR_NONE;
}