wayland: Change for scanout-queue 12/62212/2 accepted/tizen/ivi/20160324.011832 accepted/tizen/mobile/20160324.011644 accepted/tizen/tv/20160324.011725 accepted/tizen/wearable/20160324.011752 submit/tizen/20160323.123653 submit/tizen/20160323.130249 submit/tizen/20160323.180254 submit/tizen/20160324.002022
authorSangjin Lee <lsj119@samsung.com>
Tue, 15 Mar 2016 02:04:21 +0000 (11:04 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sat, 19 Mar 2016 02:23:59 +0000 (19:23 -0700)
For support fixed-scanout buffer target.
wayland-tbm expand protocol.
(commit 9979f19d9639652b61ca9903c2961b7059deabc2)

Change-Id: Id7938309f1c917a425a32203792b1cf83ca5eeae

src/tpl_wayland.c

index f330eb1..5472ef9 100644 (file)
@@ -327,7 +327,10 @@ __cb_client_window_resize_callback(struct wl_egl_window *wl_egl_window,
 static tpl_result_t
 __tpl_wayland_surface_init(tpl_surface_t *surface)
 {
+       tpl_wayland_display_t *wayland_display =
+               (tpl_wayland_display_t *) surface->display->backend.data;
        tpl_wayland_surface_t *wayland_surface = NULL;
+
        struct wl_egl_window *wl_egl_window = (struct wl_egl_window *)
                                              surface->native_handle;
 
@@ -347,8 +350,20 @@ __tpl_wayland_surface_init(tpl_surface_t *surface)
        wayland_surface->resized = TPL_FALSE;
        wayland_surface->current_buffer = NULL;
 
-       wayland_surface->tbm_queue = tbm_surface_queue_create(CLIENT_QUEUE_SIZE,
-                                    wl_egl_window->width, wl_egl_window->height, surface->format, 0);
+       if (wl_egl_window->surface)
+               wayland_surface->tbm_queue = wayland_tbm_client_create_surface_queue(wayland_display->wl_tbm_client,
+                                               wl_egl_window->surface,
+                                               3,
+                                               wl_egl_window->width,
+                                               wl_egl_window->height,
+                                               TBM_FORMAT_ARGB8888);
+       else
+               /*Why wl_surafce is NULL ?*/
+               wayland_surface->tbm_queue = tbm_surface_queue_sequence_create(3,
+                                               wl_egl_window->width,
+                                               wl_egl_window->height,
+                                               TBM_FORMAT_ARGB8888,
+                                               0);
 
        if (!wayland_surface->tbm_queue) {
                TPL_ERR("TBM surface queue creation failed!");