[cogl/cogl-1.18] wayland-server: Use wl_resource instead of wl_buffer



commit 839242024482584f537bb1741bbe644fe96d9089
Author: Neil Roberts <neil linux intel com>
Date:   Tue Oct 15 19:02:46 2013 +0100

    wayland-server: Use wl_resource instead of wl_buffer
    
    wl_buffer has been deprecated in the server API and instead
    compositors should be directly passing the wl_resource pointer to
    eglQueryWaylandBuffer.
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    (cherry picked from commit f13278bcf3f1475b7afc7d55a5218f409d119658)

 cogl/cogl-texture-2d.c                          |    5 ++---
 cogl/winsys/cogl-winsys-egl-feature-functions.h |    2 +-
 cogl/winsys/cogl-winsys-egl-private.h           |    2 +-
 cogl/winsys/cogl-winsys-egl.c                   |    2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index 60b932b..2a497d3 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -294,12 +294,12 @@ _cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
 #ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
 CoglTexture2D *
 cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
-                                         struct wl_resource *buffer_resource,
+                                         struct wl_resource *buffer,
                                          CoglError **error)
 {
   struct wl_shm_buffer *shm_buffer;
 
-  shm_buffer = wl_shm_buffer_get (buffer_resource);
+  shm_buffer = wl_shm_buffer_get (buffer);
 
   if (shm_buffer)
     {
@@ -343,7 +343,6 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
     }
   else
     {
-      struct wl_buffer *buffer = (struct wl_buffer *) buffer_resource;
       int format, width, height;
 
       if (_cogl_egl_query_wayland_buffer (ctx,
diff --git a/cogl/winsys/cogl-winsys-egl-feature-functions.h b/cogl/winsys/cogl-winsys-egl-feature-functions.h
index 2758843..85c3079 100644
--- a/cogl/winsys/cogl-winsys-egl-feature-functions.h
+++ b/cogl/winsys/cogl-winsys-egl-feature-functions.h
@@ -88,7 +88,7 @@ COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglUnbindWaylandDisplay,
                                struct wl_display *wayland_display))
 COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglQueryWaylandBuffer,
                               (EGLDisplay dpy,
-                               struct wl_buffer *buffer,
+                               struct wl_resource *buffer,
                                EGLint attribute, EGLint *value))
 COGL_WINSYS_FEATURE_END ()
 
diff --git a/cogl/winsys/cogl-winsys-egl-private.h b/cogl/winsys/cogl-winsys-egl-private.h
index 9a3b4ad..8f33191 100644
--- a/cogl/winsys/cogl-winsys-egl-private.h
+++ b/cogl/winsys/cogl-winsys-egl-private.h
@@ -162,7 +162,7 @@ _cogl_egl_destroy_image (CoglContext *ctx,
 #ifdef EGL_WL_bind_wayland_display
 CoglBool
 _cogl_egl_query_wayland_buffer (CoglContext *ctx,
-                                struct wl_buffer *buffer,
+                                struct wl_resource *buffer,
                                 int attribute,
                                 int *value);
 #endif
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index 6464485..8f5acf1 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1046,7 +1046,7 @@ _cogl_egl_destroy_image (CoglContext *ctx,
 #ifdef EGL_WL_bind_wayland_display
 CoglBool
 _cogl_egl_query_wayland_buffer (CoglContext *ctx,
-                                struct wl_buffer *buffer,
+                                struct wl_resource *buffer,
                                 int attribute,
                                 int *value)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]