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)
This commit is contained in:
Neil Roberts 2013-10-15 19:02:46 +01:00
parent 9bbb8a79c3
commit 8392420244
4 changed files with 5 additions and 6 deletions

View File

@ -294,12 +294,12 @@ _cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
#ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT #ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
CoglTexture2D * CoglTexture2D *
cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx, cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
struct wl_resource *buffer_resource, struct wl_resource *buffer,
CoglError **error) CoglError **error)
{ {
struct wl_shm_buffer *shm_buffer; struct wl_shm_buffer *shm_buffer;
shm_buffer = wl_shm_buffer_get (buffer_resource); shm_buffer = wl_shm_buffer_get (buffer);
if (shm_buffer) if (shm_buffer)
{ {
@ -343,7 +343,6 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
} }
else else
{ {
struct wl_buffer *buffer = (struct wl_buffer *) buffer_resource;
int format, width, height; int format, width, height;
if (_cogl_egl_query_wayland_buffer (ctx, if (_cogl_egl_query_wayland_buffer (ctx,

View File

@ -88,7 +88,7 @@ COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglUnbindWaylandDisplay,
struct wl_display *wayland_display)) struct wl_display *wayland_display))
COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglQueryWaylandBuffer, COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglQueryWaylandBuffer,
(EGLDisplay dpy, (EGLDisplay dpy,
struct wl_buffer *buffer, struct wl_resource *buffer,
EGLint attribute, EGLint *value)) EGLint attribute, EGLint *value))
COGL_WINSYS_FEATURE_END () COGL_WINSYS_FEATURE_END ()

View File

@ -162,7 +162,7 @@ _cogl_egl_destroy_image (CoglContext *ctx,
#ifdef EGL_WL_bind_wayland_display #ifdef EGL_WL_bind_wayland_display
CoglBool CoglBool
_cogl_egl_query_wayland_buffer (CoglContext *ctx, _cogl_egl_query_wayland_buffer (CoglContext *ctx,
struct wl_buffer *buffer, struct wl_resource *buffer,
int attribute, int attribute,
int *value); int *value);
#endif #endif

View File

@ -1046,7 +1046,7 @@ _cogl_egl_destroy_image (CoglContext *ctx,
#ifdef EGL_WL_bind_wayland_display #ifdef EGL_WL_bind_wayland_display
CoglBool CoglBool
_cogl_egl_query_wayland_buffer (CoglContext *ctx, _cogl_egl_query_wayland_buffer (CoglContext *ctx,
struct wl_buffer *buffer, struct wl_resource *buffer,
int attribute, int attribute,
int *value) int *value)
{ {