wayland-egl: Added new API to set window serial. 40/188940/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Wed, 12 Sep 2018 02:44:40 +0000 (11:44 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Wed, 12 Sep 2018 03:01:24 +0000 (12:01 +0900)
 - New wayland-egl-tizen API :
 void
  wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
unsigned int serial)

 - If client use this new API, increaing wl_egl_window->serial will not
  work at dequeue, and buffer's serial value will be set to the serial
  that the client passed to this API.
'- The serial value client want to set must be incremented
  whenever there is a change related to the window.
 - This API should be called before the gl first draw call to ensure
  the correct one frame in the desired serial.

Change-Id: I66266fc58867b331ab253ce5682df10d70176851
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/wayland-egl/wayland-egl-priv.h
src/wayland-egl/wayland-egl-tizen.c
src/wayland-egl/wayland-egl-tizen.h

index 0f87713..e729417 100644 (file)
@@ -38,6 +38,7 @@ struct wl_egl_window {
        void (*rotate_callback)(struct wl_egl_window *, void *);
        int (*get_rotation_capability)(struct wl_egl_window *, void *);
        void (*set_frontbuffer_callback)(struct wl_egl_window *, void *, int);
+       void (*set_window_serial_callback)(struct wl_egl_window *, void *, unsigned int);
 };
 
 #ifdef  __cplusplus
index d3af986..d697efd 100644 (file)
@@ -149,4 +149,18 @@ wl_egl_window_tizen_get_window_serial(struct wl_egl_window *egl_window)
        }
 
        return egl_window->serial;
+}
+
+void
+wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
+                                                                         unsigned int serial)
+{
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       if (egl_window->set_window_serial_callback)
+               egl_window->set_window_serial_callback(egl_window, egl_window->private,
+                                                                                          serial);
 }
\ No newline at end of file
index 6c76177..a1d0ee6 100644 (file)
@@ -69,6 +69,10 @@ wl_egl_window_tizen_set_window_transform(struct wl_egl_window *egl_window,
 unsigned int
 wl_egl_window_tizen_get_window_serial(struct wl_egl_window *egl_window);
 
+void
+wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
+                                                                         unsigned int serial);
+
 #ifdef  __cplusplus
 }
 #endif