From 52babccab63b757c16cfba32caf26de9b8aa7953 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Tue, 16 May 2017 18:17:54 +0900 Subject: [PATCH] tpl_wayland_egl: Fixed case of non-pixed buffer in frontbuffer mode. Change-Id: Ie5b6a7bc29bca359aa01092d4b9c86c79d8b0713 Signed-off-by: joonbum.ko --- src/tpl_wayland_egl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index fe8c4d8..262183a 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -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; -- 2.7.4