aboutsummaryrefslogtreecommitdiffstats
path: root/src/gbm/backends
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2013-09-26 12:25:11 -0700
committerKristian Høgsberg <[email protected]>2013-10-11 15:14:35 -0700
commit360a141f24a9d00891665b7fedb77ffb116944ca (patch)
tree79ebe6820c6a23471849307af1d5b03f1b965de2 /src/gbm/backends
parentfe6974382b353efebf06dfb2d00b0b2c752fb666 (diff)
wayland: Don't rely on static variable for identifying wl_drm buffers
Now that libEGL has been fixed to not leak all kinds of symbols, gbm links to its own copy of the libwayland-drm.a helper library. That means we can't rely on comparing the addresses of a static vtable symbol in that library to determine if a wl_buffer is a wl_drm_buffer. Instead, we move the vtable into the wl_drm struct and use that for comparing. https://bugs.freedesktop.org/show_bug.cgi?id=69437 Cc: 9.2 <[email protected]>
Diffstat (limited to 'src/gbm/backends')
-rw-r--r--src/gbm/backends/dri/gbm_dri.c5
-rw-r--r--src/gbm/backends/dri/gbm_driint.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index f7da79cac14..24ed2f1c6ab 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -376,7 +376,10 @@ gbm_dri_bo_import(struct gbm_device *gbm,
{
struct wl_drm_buffer *wb;
- wb = wayland_drm_buffer_get((struct wl_resource *) buffer);
+ if (!dri->wl_drm)
+ return NULL;
+
+ wb = wayland_drm_buffer_get(dri->wl_drm, (struct wl_resource *) buffer);
if (!wb)
return NULL;
diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h
index 18fc3c0919e..90d764fb44f 100644
--- a/src/gbm/backends/dri/gbm_driint.h
+++ b/src/gbm/backends/dri/gbm_driint.h
@@ -66,6 +66,8 @@ struct gbm_dri_device {
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *data);
+
+ struct wl_drm *wl_drm;
};
struct gbm_dri_bo {