};
#endif
+static const struct wl_buffer_listener wl_buffer_release_listener;
+
static int
_get_tbm_surface_bo_name(tbm_surface_h tbm_surface);
static void
TPL_INFO("[WL_BUFFER_CREATE]",
"wl_egl_buffer(%p) wl_buffer(%p) tbm_surface(%p)",
wl_egl_buffer, wl_egl_buffer->wl_buffer, tbm_surface);
+ if (!wl_egl_display->use_explicit_sync ||
+ !wl_egl_surface->surface_sync) {
+ wl_buffer_add_listener((struct wl_buffer *)wl_egl_buffer->wl_buffer,
+ &wl_buffer_release_listener,
+ wl_egl_buffer);
+ }
}
}
(struct wl_proxy *)wayland_tbm_client_create_buffer(
wl_egl_display->wl_tbm_client,
wl_egl_buffer->tbm_surface);
+ TPL_INFO("[WL_BUFFER_CREATE]",
+ "wl_egl_buffer(%p) wl_buffer(%p) tbm_surface(%p)",
+ wl_egl_buffer, wl_egl_buffer->wl_buffer,
+ wl_egl_buffer->tbm_surface);
+
+ if (!wl_egl_display->use_explicit_sync ||
+ !wl_egl_surface->surface_sync) {
+ wl_buffer_add_listener((struct wl_buffer *)wl_egl_buffer->wl_buffer,
+ &wl_buffer_release_listener,
+ wl_egl_buffer);
+ }
}
TPL_CHECK_ON_FALSE_ASSERT_FAIL(wl_egl_buffer->wl_buffer != NULL,
"[FATAL] Failed to create wl_buffer");
wl_egl_buffer->buffer_release, &zwp_release_listner, wl_egl_buffer);
TPL_DEBUG("add explicit_sync_release_listener.");
}
- } else
-#endif
- {
- wl_buffer_add_listener((void *)wl_egl_buffer->wl_buffer,
- &wl_buffer_release_listener, wl_egl_buffer);
}
+#endif
wl_surface_commit(wl_surface);