#ifdef WORKER_TEST_ONLY
#include <sys/syscall.h>
-
+#include "wayland-egl/wayland-egl-priv.h"
#define FONT_DEFAULT "\033[0m" /* for reset to default color */
#define FONT_RED "\033[31m" /* for error logs */
#define FONT_GREEN "\033[32m" /* for frontend API logs */
gpointer tag;
int event_fd;
struct wl_surface *surf;
+ struct wl_egl_window *wl_egl_window;
tbm_surface_queue_h tbm_surface_queue;
twe_wl_disp_source *disp_source;
};
twe_surface_h
twe_surface_add(twe_thread* thread,
twe_display_h twe_display,
- struct wl_surface *surface)
+ struct wl_egl_window *wl_egl_window)
{
twe_thread_context *ctx = thread->ctx;
twe_wl_surf_source *source = NULL;
twe_wl_disp_source *disp_source = (twe_wl_disp_source *)twe_display;
GIOChannel *event_channel = NULL;
gboolean is_destroyed = FALSE;
+ struct wl_surface *surface = wl_egl_window->surface;
if (!twe_display ||
(is_destroyed = g_source_is_destroyed(&disp_source->gsource))) {
source->event_fd,
G_IO_IN);
source->surf = surface;
+ source->wl_egl_window = wl_egl_window;
source->disp_source = (twe_wl_disp_source *)twe_display;
g_source_set_callback(&source->gsource, NULL, surface, NULL);
g_source_attach(&source->gsource, g_main_loop_get_context(ctx->twe_loop));
g_source_unref(&source->gsource);
- TPL_DEBUG("gsource(%p) wl_surface(%p) event_fd(%d)",
- source, surface, source->event_fd);
+ TPL_DEBUG("gsource(%p) wl_egl_window(%p) wl_surface(%p) event_fd(%d)",
+ source, wl_egl_window, surface, source->event_fd);
return (twe_surface_h)source;
}
g_source_destroy(&surf_source->gsource);
g_source_unref(&surf_source->gsource);
- TPL_DEBUG("twe_surface(%p) wl_surface(%p)", surf_source, surf_source->surf);
+ TPL_DEBUG("twe_surface(%p) wl_egl_window(%p) wl_surface(%p)",
+ surf_source, surf_source->wl_egl_window, surf_source->surf);
return TPL_ERROR_NONE;
}
#include <tbm_surface.h>
#include <tbm_surface_queue.h>
+#include "wayland-egl/wayland-egl-priv.h"
#include "tpl.h"
typedef struct _twe_thread twe_thread;
twe_surface_h
twe_surface_add(twe_thread* thread,
twe_display_h twe_display,
- struct wl_surface *surface);
+ struct wl_egl_window *wl_egl_window);
tpl_result_t
twe_surface_del(twe_surface_h twe_surface);