tdm_client_vblank *tdm_vblank; /* vblank object for each wl_surface */
tpl_bool_t vblank_done;
tpl_bool_t is_activated;
+ tpl_bool_t set_serial_is_used; /* Will be deprecated */
+ unsigned int serial;
int latest_transform;
tpl_list_t *attached_buffers; /* list for tracking [ACQ]~[REL] buffers */
tpl_list_t *dequeued_buffers; /* list for tracking [DEQ]~[ENQ] buffers */
void *private, int set);
static void
+__cb_client_window_set_window_serial_callback(struct wl_egl_window *wl_egl_window,
+ void *private, unsigned int serial);
+
+static void
__cb_tbm_surface_queue_reset_callback(tbm_surface_queue_h surface_queue,
void *data)
{
wayland_egl_surface->is_activated = TPL_FALSE;
wayland_egl_surface->current_buffer = NULL;
wayland_egl_surface->latest_transform = wl_egl_window->transform;
+ wayland_egl_surface->set_serial_is_used = TPL_FALSE;
+ wayland_egl_surface->serial = 0;
wayland_egl_surface->attached_buffers = __tpl_list_alloc();
if (!wayland_egl_surface->attached_buffers) {
__cb_client_window_get_rotation_capability;
wl_egl_window->set_frontbuffer_callback = (void *)
__cb_client_window_set_frontbuffer_mode;
+ wl_egl_window->set_window_serial_callback = (void *)
+ __cb_client_window_set_window_serial_callback;
/* tdm_vblank object decide to be maintained every tpl_wayland_egl_surface
for the case where the several surfaces is created in one display connection. */
wl_display_flush(wayland_egl_display->wl_dpy);
- ++wl_egl_window->serial;
- wayland_egl_buffer->serial = wl_egl_window->serial;
+ if (wayland_egl_surface->set_serial_is_used) {
+ wayland_egl_buffer->serial = wayland_egl_surface->serial;
+ } else {
+ ++wl_egl_window->serial;
+ wayland_egl_buffer->serial = wl_egl_window->serial;
+ }
wayland_egl_buffer->dx = wl_egl_window->dx;
wayland_egl_buffer->dy = wl_egl_window->dy;
surface->is_frontbuffer_mode = TPL_FALSE;
}
+static void
+__cb_client_window_set_window_serial_callback(struct wl_egl_window *wl_egl_window,
+ void *private, unsigned int serial)
+{
+ TPL_ASSERT(private);
+ TPL_ASSERT(wl_egl_window);
+
+ tpl_surface_t *surface = (tpl_surface_t *)private;
+
+ TPL_ASSERT(surface->backend.data);
+
+ tpl_wayland_egl_surface_t *wayland_egl_surface =
+ (tpl_wayland_egl_surface_t *)surface->backend.data;
+
+ wayland_egl_surface->set_serial_is_used = TPL_TRUE;
+ wayland_egl_surface->serial = serial;
+}
+
+
#define IMPL_TIZEN_SURFACE_SHM_VERSION 2
void
tdm_client_vblank *vblank;
tpl_bool_t vblank_done;
tpl_bool_t is_destroying;
+ tpl_bool_t set_serial_is_used; /* Will be deprecated */
+ unsigned int serial;
struct tizen_surface_shm_flusher *tss_flusher;
tbm_surface_queue_h tbm_queue;
twe_wl_disp_source *disp_source;
return rotation_capability;
}
+static void
+__cb_set_window_serial_callback(struct wl_egl_window *wl_egl_window,
+ void *private, unsigned int serial)
+{
+ TPL_ASSERT(private);
+ TPL_ASSERT(wl_egl_window);
+
+ twe_wl_surf_source *source = (twe_wl_surf_source *)private;
+
+ source->set_serial_is_used = TPL_TRUE;
+ source->serial = serial;
+}
+
static void __cb_tss_flusher_flush_callback(void *data,
struct tizen_surface_shm_flusher *tss_flusher)
{
buf_info->transform = wl_egl_window->transform;
buf_info->dx = wl_egl_window->dx;
buf_info->dy = wl_egl_window->dy;
- ++wl_egl_window->serial;
- buf_info->serial = wl_egl_window->serial;
+ if (surf_source->set_serial_is_used) {
+ buf_info->serial = surf_source->serial;
+ } else {
+ ++wl_egl_window->serial;
+ buf_info->serial = wl_egl_window->serial;
+ }
}
if (buf_info->rects) {
}
buf_info->transform = wl_egl_window->transform;
- ++wl_egl_window->serial;
- buf_info->serial = wl_egl_window->serial;
+
+ if (surf_source->set_serial_is_used) {
+ buf_info->serial = surf_source->serial;
+ } else {
+ ++wl_egl_window->serial;
+ buf_info->serial = wl_egl_window->serial;
+ }
if (surf_source->in_use_buffers) {
g_mutex_lock(&surf_source->surf_mutex);
source->vk_sub_thread = NULL;
source->draw_done_count = 0;
+ source->set_serial_is_used = TPL_FALSE;
+ source->serial = 0;
+
if (!disp_source->is_vulkan_dpy) {
struct wl_egl_window *wl_egl_window =
(struct wl_egl_window *)native_handle;
wl_egl_window->rotate_callback = (void *)__cb_rotate_callback;
wl_egl_window->get_rotation_capability = (void *)
__cb_get_rotation_capability;
+ wl_egl_window->set_window_serial_callback = (void *)
+ __cb_set_window_serial_callback;
source->wl_egl_window = wl_egl_window;
source->surf = wl_egl_window->surface;