diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-07 08:05:09 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-07 08:24:58 -0700 |
commit | 7d1a04e499564212a2a9aace12b05f424a357d3f (patch) | |
tree | f0b12d8c0d7916d0dbedfb3adad3d1d786455024 /src/mesa/pipe/xlib/xm_api.c | |
parent | 52236661653169140d07a500facd65185b6b3666 (diff) |
Add winsys->surface_release() to complement winsys->surface_alloc().
pipe_surface now has a pointer to the winsys which create/owns the surface.
This allows clean surface deallocation w/out a rendering context.
Diffstat (limited to 'src/mesa/pipe/xlib/xm_api.c')
-rw-r--r-- | src/mesa/pipe/xlib/xm_api.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mesa/pipe/xlib/xm_api.c b/src/mesa/pipe/xlib/xm_api.c index 939dfe745b..ec889ca34f 100644 --- a/src/mesa/pipe/xlib/xm_api.c +++ b/src/mesa/pipe/xlib/xm_api.c @@ -301,6 +301,7 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, { XMesaBuffer b; GLframebuffer *fb; + struct pipe_winsys *winsys = xmesa_get_pipe_winsys(); ASSERT(type == WINDOW || type == PIXMAP || type == PBUFFER); @@ -328,7 +329,7 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, /* * Front renderbuffer */ - b->frontxrb = xmesa_create_renderbuffer(NULL, 0, &vis->mesa_visual, GL_FALSE); + b->frontxrb = xmesa_create_renderbuffer(winsys, 0, &vis->mesa_visual, GL_FALSE); if (!b->frontxrb) { _mesa_free(b); return NULL; @@ -337,18 +338,12 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, b->frontxrb->drawable = d; b->frontxrb->pixmap = (XMesaPixmap) d; _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &b->frontxrb->St.Base); -#if 0 /* sketch... */ - { - struct pipe_surface *front_surf; - front_surf = xmesa_create_front_surface(vis, d); - } -#endif /* * Back renderbuffer */ if (vis->mesa_visual.doubleBufferMode) { - b->backxrb = xmesa_create_renderbuffer(NULL, 0, &vis->mesa_visual, GL_TRUE); + b->backxrb = xmesa_create_renderbuffer(winsys, 0, &vis->mesa_visual, GL_TRUE); if (!b->backxrb) { /* XXX free front xrb too */ _mesa_free(b); |