summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r--src/sna/sna_dri2.c7
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 &&