OSDN Git Service

st/xlib: initialize the drawable size in create_xmesa_buffer()
authorBrian Paul <brianp@vmware.com>
Mon, 18 Feb 2013 18:17:07 +0000 (11:17 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 19 Feb 2013 14:19:19 +0000 (07:19 -0700)
Otherwise, the PBuffer's size was never set.  This also initializes
the buffer size for windows, pixmaps, etc.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61012

Note: This is a candidate for the stable branches.

src/gallium/state_trackers/glx/xlib/xm_api.c

index 607584f..021175c 100644 (file)
@@ -438,7 +438,6 @@ create_xmesa_buffer(Drawable d, BufferType type,
 {
    XMesaDisplay xmdpy = xmesa_init_display(vis->display);
    XMesaBuffer b;
-   uint width, height;
 
    ASSERT(type == WINDOW || type == PIXMAP || type == PBUFFER);
 
@@ -457,7 +456,7 @@ create_xmesa_buffer(Drawable d, BufferType type,
    b->type = type;
    b->cmap = cmap;
 
-   get_drawable_size(vis->display, d, &width, &height);
+   get_drawable_size(vis->display, d, &b->width, &b->height);
 
    /*
     * Create framebuffer, but we'll plug in our own renderbuffers below.