ifneq ($(call is-feature-enabled,ttrace),)
CFLAGS += -DTTRACE_ENABLE
endif
+ifneq ($(call is-feature-enabled,egl_bind_wl_display),)
+ CFLAGS += -DEGL_BIND_WL_DISPLAY
+endif
TPL_HEADERS += $(SRC_DIR)/tpl.h
TPL_HEADERS += $(SRC_DIR)/tpl_internal.h
%define TPL_VER_MAJOR 0
-%define TPL_VER_MINOR 6
+%define TPL_VER_MINOR 7
%define TPL_RELEASE 1
%define TPL_VERSION %{TPL_VER_MAJOR}.%{TPL_VER_MINOR}
%define TPL_VER_FULL %{TPL_VERSION}.%{TPL_RELEASE}
%endif
%if "%{TPL_WINSYS}" == "DRI2"
-export TPL_OPTIONS=${TPL_OPTIONS}-winsys_dri2
+TPL_OPTIONS=${TPL_OPTIONS}-winsys_dri2
%endif
%if "%{TPL_WINSYS}" == "DRI3"
-export TPL_OPTIONS=${TPL_OPTIONS}-winsys_dri3
+TPL_OPTIONS=${TPL_OPTIONS}-winsys_dri3
%endif
%if "%{TPL_WINSYS}" == "WL"
-export TPL_OPTIONS=${TPL_OPTIONS}-winsys_wl
+TPL_OPTIONS=${TPL_OPTIONS}-winsys_wl
%endif
-export TPL_VER_MAJOR=%{TPL_VER_MAJOR}
-export TPL_VER_MINOR=%{TPL_VER_MINOR}
-export TPL_RELEASE=%{TPL_RELEASE}
-
%if "%{ENABLE_TTRACE}" == "1"
-export TPL_OPTIONS=${TPL_OPTIONS}-ttrace
+TPL_OPTIONS=${TPL_OPTIONS}-ttrace
%endif
+TPL_OPTIONS=${TPL_OPTIONS}-egl_bind_wl_display
+
+# do not change the following line
export TPL_OPTIONS=${TPL_OPTIONS}-
+export TPL_VER_MAJOR=%{TPL_VER_MAJOR}
+export TPL_VER_MINOR=%{TPL_VER_MINOR}
+export TPL_RELEASE=%{TPL_RELEASE}
+
make all
%install
static void __cb_server_gbm_surface_release_buffer(struct gbm_surface *gbm_surf, struct gbm_bo *gbm_bo);
static int __cb_server_gbm_surface_has_free_buffers(struct gbm_surface *gbm_surf);
+#ifdef EGL_BIND_WL_DISPLAY
+unsigned int __tpl_wayland_display_bind_client_display(tpl_display_t *tpl_display, tpl_handle_t native_dpy);
+unsigned int __tpl_wayland_display_unbind_client_display(tpl_display_t *tpl_display, tpl_handle_t native_dpy);
+#endif
+
#define TPL_BUFFER_CACHE_MAX_ENTRIES 40
static TPL_INLINE void
__tpl_wayland_surface_buffer_cache_add(tpl_list_t *buffer_cache, tpl_buffer_t *buffer)
backend->fini = __tpl_wayland_display_fini;
backend->query_config = __tpl_wayland_display_query_config;
backend->filter_config = __tpl_wayland_display_filter_config;
- backend->get_window_info = __tpl_wayland_display_get_window_info;
- backend->get_pixmap_info = __tpl_wayland_display_get_pixmap_info;
+ backend->get_window_info = __tpl_wayland_display_get_window_info;
+ backend->get_pixmap_info = __tpl_wayland_display_get_pixmap_info;
backend->flush = __tpl_wayland_display_flush;
+#ifdef EGL_BIND_WL_DISPLAY
+ backend->bind_client_display_handle = __tpl_wayland_display_bind_client_display;
+ backend->unbind_client_display_handle = __tpl_wayland_display_unbind_client_display;
+#endif
}
void
return 0;
}
-#ifdef EGL_BIND_WL_DISPLAY
static struct wayland_drm_callbacks wl_drm_server_listener;
static int
__cb_server_wayland_drm_unreference_buffer
};
-unsigned int __egl_platform_bind_wayland_display(void * display, struct wl_display *wayland_display)
+#ifdef EGL_BIND_WL_DISPLAY
+unsigned int __tpl_wayland_display_bind_client_display(tpl_display_t *tpl_display, tpl_handle_t native_dpy)
{
- tpl_display_t *tpl_display = tpl_display_get(TPL_BACKEND_WAYLAND, display);
+ struct wl_display *wayland_display = (struct wl_display *)native_dpy;
tpl_wayland_display_t *tpl_wayland_display = (tpl_wayland_display_t *)tpl_display->backend.data;
char *device_name = NULL;
return TPL_TRUE;
}
-unsigned int __egl_platform_unbind_wayland_display(void * display, struct wl_display *wayland_display)
+unsigned int __tpl_wayland_display_unbind_client_display(tpl_display_t *tpl_display, tpl_handle_t native_dpy)
{
- tpl_display_t *tpl_display = tpl_display_get(TPL_BACKEND_WAYLAND, display);
tpl_wayland_display_t *tpl_wayland_display = (tpl_wayland_display_t *)tpl_display->backend.data;
if (tpl_wayland_display->wl_drm == NULL)