summaryrefslogtreecommitdiffstats
path: root/src/gbm/backends/dri/gbm_dri.c
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/dri/gbm_dri.c
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/dri/gbm_dri.c')
-rw-r--r--src/gbm/backends/dri/gbm_dri.c5
1 files changed, 4 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;