tpl_gthread *thread;
tpl_gmutex wl_event_mutex;
- struct wl_display *wl_display;
+ struct wl_display *wl_display;
struct wl_event_queue *ev_queue;
struct wayland_tbm_client *wl_tbm_client;
int last_error; /* errno of the last wl_display error*/
tpl_wl_egl_display_t *wl_egl_display = (tpl_wl_egl_display_t *)data;
if (!strcmp(interface, "tizen_surface_shm")) {
- wl_egl_display->tss = wl_registry_bind(wl_registry,
- name,
- &tizen_surface_shm_interface,
- ((version < IMPL_TIZEN_SURFACE_SHM_VERSION) ?
- version : IMPL_TIZEN_SURFACE_SHM_VERSION));
+ wl_egl_display->tss =
+ wl_registry_bind(wl_registry,
+ name,
+ &tizen_surface_shm_interface,
+ ((version < IMPL_TIZEN_SURFACE_SHM_VERSION) ?
+ version : IMPL_TIZEN_SURFACE_SHM_VERSION));
} else if (!strcmp(interface, wp_presentation_interface.name)) {
wl_egl_display->presentation =
wl_registry_bind(wl_registry,
wl_egl_display->explicit_sync = NULL;
wl_egl_display->wl_tbm_client = NULL;
- wl_egl_display->use_wait_vblank = TPL_TRUE; // default enabled
+ wl_egl_display->use_wait_vblank = TPL_TRUE; // default enabled
{
char *env = tpl_getenv("TPL_WAIT_VBLANK");
if (env && !atoi(env)) {
__tpl_display_choose_backend_wl_egl_thread2(tpl_handle_t native_dpy)
{
struct wl_interface *wl_egl_native_dpy = *(void **) native_dpy;
+
TPL_CHECK_ON_NULL_RETURN_VAL(wl_egl_native_dpy, TPL_FALSE);
/* MAGIC CHECK: A native display handle is a wl_display if the de-referenced first value
static void
__cb_destroy_callback(void *private)
{
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = NULL;
if (!tizen_private) {
TPL_ASSERT(private);
TPL_ASSERT(wl_egl_window);
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
int cur_w, cur_h, req_w, req_h, format;
TPL_ASSERT(private);
TPL_ASSERT(wl_egl_window);
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
int rotation = tizen_private->rotation;
TPL_ASSERT(private);
TPL_ASSERT(wl_egl_window);
- int rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE;
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ int rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
if (!wl_egl_surface) {
TPL_ASSERT(private);
TPL_ASSERT(wl_egl_window);
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
if (!wl_egl_surface) {
int commit_sync_fd = -1;
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
if (!wl_egl_surface) {
wl_egl_surface->commit_sync.fd = eventfd(0, EFD_CLOEXEC);
if (wl_egl_surface->commit_sync.fd == -1) {
- TPL_ERR("Failed to create commit_sync_fd. wl_egl_surface(%p)", wl_egl_surface);
+ TPL_ERR("Failed to create commit_sync_fd. wl_egl_surface(%p)",
+ wl_egl_surface);
tpl_gmutex_unlock(&wl_egl_surface->commit_sync.mutex);
return -1;
}
int presentation_sync_fd = -1;
- struct tizen_private *tizen_private = (struct tizen_private *)private;
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
if (!wl_egl_surface) {
wl_egl_surface->presentation_sync.fd = eventfd(0, EFD_CLOEXEC);
if (wl_egl_surface->presentation_sync.fd == -1) {
- TPL_ERR("Failed to create presentation_sync_fd. wl_egl_surface(%p)", wl_egl_surface);
+ TPL_ERR("Failed to create presentation_sync_fd. wl_egl_surface(%p)",
+ wl_egl_surface);
tpl_gmutex_unlock(&wl_egl_surface->presentation_sync.mutex);
return -1;
}
struct tizen_surface_shm_flusher *tss_flusher)
{
tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)data;
- tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
+ tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
TPL_INFO("[FREE_BUFFER_FLUSH]", "wl_egl_surface(%p) tbm_queue(%p)",
wl_egl_surface, wl_egl_surface->tbm_queue);
int num_buffers)
{
tbm_surface_queue_h tbm_queue = NULL;
- tbm_bufmgr bufmgr = NULL;
+ tbm_bufmgr bufmgr = NULL;
unsigned int capability;
struct wl_surface *wl_surface = wl_egl_surface->wl_surface;
}
static const struct zwp_linux_buffer_release_v1_listener zwp_release_listner = {
- __cb_buffer_fenced_release,
- __cb_buffer_immediate_release,
+ __cb_buffer_fenced_release,
+ __cb_buffer_immediate_release,
};
static void
static void
__cb_presentation_feedback_sync_output(void *data,
- struct wp_presentation_feedback *presentation_feedback,
- struct wl_output *output)
+ struct wp_presentation_feedback *presentation_feedback,
+ struct wl_output *output)
{
TPL_IGNORE(data);
TPL_IGNORE(presentation_feedback);
static void
_print_buffer_lists(tpl_wl_egl_surface_t *wl_egl_surface)
{
- int idx = 0;
+ int idx = 0;
tpl_gmutex_lock(&wl_egl_surface->buffers_mutex);
TPL_INFO("[BUFFERS_INFO]", "wl_egl_surface(%p) buffer_cnt(%d)",