From 03224f492dc9cee179ff9ed961be0443a3669dd1 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 8 Sep 2010 00:30:27 +0800 Subject: st/xlib: Notify the context when the front/back buffers are swapped. The current context should be notified when the the front/back buffers of the current drawable are swapped. The notification was skipped when xmesa_strict_invalidate is false (the default). This fixes fdo bug #29774. --- src/gallium/state_trackers/glx/xlib/xm_api.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/gallium/state_trackers/glx/xlib/xm_api.c') diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 36d63c30d6..f950c8858b 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -1087,19 +1087,29 @@ XMesaDestroyBuffer(XMesaBuffer b) /** - * Query the current drawable size and notify the binding context. + * Notify the binding context to validate the buffer. */ void -xmesa_check_buffer_size(XMesaBuffer b) +xmesa_notify_invalid_buffer(XMesaBuffer b) { XMesaContext xmctx = XMesaGetCurrentContext(); + if (xmctx && xmctx->xm_buffer == b) + xmctx->st->notify_invalid_framebuffer(xmctx->st, b->stfb); +} + + +/** + * Query the current drawable size and notify the binding context. + */ +void +xmesa_check_buffer_size(XMesaBuffer b) +{ if (b->type == PBUFFER) return; xmesa_get_window_size(b->xm_visual->display, b, &b->width, &b->height); - if (xmctx && xmctx->xm_buffer == b) - xmctx->st->notify_invalid_framebuffer(xmctx->st, b->stfb); + xmesa_notify_invalid_buffer(b); } -- cgit v1.2.3