diff options
author | Brian <brian@i915.localnet.net> | 2007-07-31 17:42:03 -0600 |
---|---|---|
committer | Brian <brian@i915.localnet.net> | 2007-07-31 17:42:03 -0600 |
commit | 20adf45c23dd9ec86a1439ad87c1473395bbb1a7 (patch) | |
tree | eee17a4b7b1572651c2b20661b26b82def9cdd34 /src/mesa/drivers/x11/xm_buffer.c | |
parent | 2f245bce420c7a6c6928c4927d0f9a5701cde17f (diff) |
Redesign pipe_surface in terms of pipe_region.
struct pipe_buffer goes away.
Added basic region functions to softpipe to allocate/release malloc'd regions.
Surface-related code is fairly coherent now.
Diffstat (limited to 'src/mesa/drivers/x11/xm_buffer.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_buffer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index 8fbd9a783b..5bba52da48 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -269,7 +269,10 @@ xmesa_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb, rb->Height = height; rb->InternalFormat = internalFormat; - rb->surface->resize(rb->surface, width, height); + if (!xrb->Base.surface) + xrb->Base.surface = xmesa_new_surface(ctx, xrb); + xrb->Base.surface->width = width; + xrb->Base.surface->height = height; return GL_TRUE; } @@ -320,7 +323,10 @@ xmesa_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, xrb->origin4 = NULL; } - rb->surface->resize(rb->surface, width, height); + if (!xrb->Base.surface) + xrb->Base.surface = xmesa_new_surface(ctx, xrb); + xrb->Base.surface->width = width; + xrb->Base.surface->height = height; return GL_TRUE; } @@ -357,9 +363,6 @@ xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual, xrb->Base.IndexBits = visual->indexBits; } /* only need to set Red/Green/EtcBits fields for user-created RBs */ - - xrb->Base.surface = xmesa_new_surface(xrb); - } return xrb; } |