tpl_wayland_egl_thread: Changed input parameter wl_surface to wl_egl_window. 54/134954/4
authorjoonbum.ko <joonbum.ko@samsung.com>
Mon, 24 Apr 2017 05:03:48 +0000 (14:03 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Wed, 21 Jun 2017 07:04:25 +0000 (16:04 +0900)
Change-Id: I2a51d9d200d0bb011aecf7171d1d559f93befde1
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/tpl_wayland_egl_thread.c
src/tpl_wayland_egl_thread.h

index 4ca8606..0a6a315 100644 (file)
@@ -14,7 +14,7 @@
 
 #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 */
@@ -86,6 +86,7 @@ struct _twe_wl_surf_source {
        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;
 };
@@ -443,13 +444,14 @@ twe_surface_get_tbm_queue(twe_surface_h twe_surface)
 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))) {
@@ -479,14 +481,15 @@ twe_surface_add(twe_thread* thread,
                                                                           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;
 }
@@ -518,7 +521,8 @@ twe_surface_del(twe_surface_h twe_surface)
        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;
 }
index 61788e9..26f9bea 100644 (file)
@@ -1,6 +1,7 @@
 #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;
@@ -24,7 +25,7 @@ twe_display_del(twe_display_h display);
 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);