#include <signal.h>
#include <pepper.h>
+#include <tbm_bufmgr.h>
#include <headless_server.h>
int use_output = 1;
const char *socket_name = NULL;
pepper_compositor_t *compositor = NULL;
pepper_bool_t ret;
+ tbm_bufmgr bufmgr = NULL;
/* set STDOUT/STDERR bufferless */
setvbuf(stdout, NULL, _IONBF, 0);
ret = headless_output_init(compositor);
PEPPER_CHECK(ret, goto end, "headless_output_init() failed.\n");
}
+ else {
+ bufmgr = tbm_bufmgr_server_init();
+ PEPPER_CHECK(bufmgr, goto end, "Failed to init tbm buffer manager !\n");
+ ret = tbm_bufmgr_bind_native_display(bufmgr, (void *)pepper_compositor_get_display(compositor));
+ PEPPER_CHECK(ret, goto end, "Failed to bind native display with tbm buffer manager !\n");
+ }
/* Init Shell */
ret = headless_shell_init(compositor);
headless_input_deinit(compositor);
if(use_output)
headless_output_deinit(compositor);
+ if (bufmgr)
+ {
+ tbm_bufmgr_deinit(bufmgr);
+ bufmgr = NULL;
+ }
headless_debug_deinit(compositor);
pepper_compositor_destroy(compositor);