diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-25 18:05:46 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-25 18:08:20 +0100 |
commit | 2ec2164ba4bd3a266949cdb379b6da1090475c08 (patch) | |
tree | d3f96619350cdfd8f28938bd0bb5d81086122b70 /src | |
parent | 258f8983daa3a8fe315c440f5e298ae1b02fd678 (diff) |
sna/dri2: Compile fixes for ancient Xorg
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_dri2.c | 7 |
1 files 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 && |