tpl_wayland_egl: Fixed case of non-pixed buffer in frontbuffer mode. 13/129413/1
authorjoonbum.ko <joonbum.ko@samsung.com>
Tue, 16 May 2017 09:17:54 +0000 (18:17 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Tue, 16 May 2017 09:17:54 +0000 (18:17 +0900)
Change-Id: Ie5b6a7bc29bca359aa01092d4b9c86c79d8b0713
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/tpl_wayland_egl.c

index fe8c4d8..262183a 100644 (file)
@@ -49,6 +49,7 @@ struct _tpl_wayland_egl_surface {
        tpl_bool_t reset; /* TRUE if queue reseted by external  */
        tdm_client_vblank *tdm_vblank; /* vblank object for each wl_surface */
        tpl_bool_t vblank_done;
+       tpl_bool_t is_activated;
        tpl_list_t *attached_buffers; /* list for tracking [ACQ]~[REL] buffers */
        tpl_list_t *dequeued_buffers; /* list for tracking [DEQ]~[ENQ] buffers */
        struct tizen_surface_shm_flusher *tizen_surface_shm_flusher; /* wl_proxy for buffer flush */
@@ -500,6 +501,7 @@ __tpl_wayland_egl_surface_init(tpl_surface_t *surface)
        wayland_egl_surface->resized = TPL_FALSE;
        wayland_egl_surface->reset = TPL_FALSE;
        wayland_egl_surface->vblank_done = TPL_TRUE;
+       wayland_egl_surface->is_activated = TPL_FALSE;
        wayland_egl_surface->current_buffer = NULL;
 
        wayland_egl_surface->attached_buffers = __tpl_list_alloc();
@@ -1115,9 +1117,12 @@ __tpl_wayland_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeou
                wayland_egl_buffer->height = wl_egl_window->height;
                wayland_egl_buffer->rotation = wl_egl_window->rotation;
                wayland_egl_buffer->reset = TPL_FALSE;
-               wayland_egl_buffer->is_new = TPL_FALSE;
+
+               if (wayland_egl_surface->is_activated != is_activated)
+                       wayland_egl_buffer->is_new = TPL_TRUE;
 
                wayland_egl_surface->reset = TPL_FALSE;
+               wayland_egl_surface->is_activated = is_activated;
 
                if (wayland_egl_surface->dequeued_buffers) {
                        TPL_OBJECT_LOCK(&wayland_egl_surface->base);
@@ -1170,6 +1175,7 @@ __tpl_wayland_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeou
        /* 'is_new' flag is to check wheter it is a new buffer need to commit
         * in frontbuffer mode. */
        wayland_egl_buffer->is_new = TPL_TRUE;
+       wayland_egl_surface->is_activated = is_activated;
 
        wayland_egl_surface->current_buffer = tbm_surface;
        wayland_egl_surface->reset = TPL_FALSE;