summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_buffer.c
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-07-31 17:42:03 -0600
committerBrian <brian@i915.localnet.net>2007-07-31 17:42:03 -0600
commit20adf45c23dd9ec86a1439ad87c1473395bbb1a7 (patch)
treeeee17a4b7b1572651c2b20661b26b82def9cdd34 /src/mesa/drivers/x11/xm_buffer.c
parent2f245bce420c7a6c6928c4927d0f9a5701cde17f (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.c13
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;
}