From 2ec2164ba4bd3a266949cdb379b6da1090475c08 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 25 Jun 2014 18:05:46 +0100 Subject: sna/dri2: Compile fixes for ancient Xorg Signed-off-by: Chris Wilson --- src/sna/sna_dri2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 4220f8f8..9f8b8ee2 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -230,6 +230,9 @@ dri2_chain(DrawablePtr d) assert(priv != NULL); return priv->chain; } +inline static DRI2BufferPtr dri2_window_get_front(WindowPtr win) { return dri2_window(win)->front; } +#else +inline static void *dri2_window_get_front(WindowPtr win) { return NULL; } #endif #if DRI2INFOREC_VERSION < 6 @@ -420,7 +423,7 @@ sna_dri2_create_buffer(DrawablePtr draw, pixmap = get_drawable_pixmap(draw); buffer = NULL; if (draw->type != DRAWABLE_PIXMAP) - buffer = dri2_window((WindowPtr)draw)->front; + buffer = dri2_window_get_front((WindowPtr)draw); if (buffer == NULL) buffer = sna_pixmap_get_buffer(pixmap); if (buffer) { @@ -466,7 +469,7 @@ sna_dri2_create_buffer(DrawablePtr draw, case DRI2BufferBackLeft: if (draw->type != DRAWABLE_PIXMAP) { - if (dri2_window((WindowPtr)draw)->front) + if (dri2_window_get_front((WindowPtr)draw)) flags |= CREATE_SCANOUT; if (draw->width == sna->front->drawable.width && draw->height == sna->front->drawable.height && -- cgit v1.2.3