summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-16 12:10:46 -0700
committerBrian Paul <[email protected]>2012-01-24 14:12:26 -0700
commit7a36345f70a0b8ac2d480bb52eb2c74c2be5a978 (patch)
tree9c2208246754d4f5f9310a261c653e45933b1c4e /src/mesa/drivers
parentf6a3979a0444a14c198c10501e9ff13f24625443 (diff)
mesa: rename gl_renderbuffer::Data to Buffer
To better indicate that this pointer to the malloc'd memory.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c6
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c26
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c14
-rw-r--r--src/mesa/drivers/x11/xm_api.c4
4 files changed, 25 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index e13d62cc914..5463776aeb6 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -132,11 +132,11 @@ intel_map_renderbuffer(struct gl_context *ctx,
void *map;
int stride;
- if (!irb && rb->Data) {
+ if (!irb && rb->Buffer) {
/* this is a malloc'd renderbuffer (accum buffer) */
GLint bpp = _mesa_get_format_bytes(rb->Format);
GLint rowStride = rb->RowStrideBytes;
- *out_map = (GLubyte *) rb->Data + y * rowStride + x * bpp;
+ *out_map = (GLubyte *) rb->Buffer + y * rowStride + x * bpp;
*out_stride = rowStride;
return;
}
@@ -185,7 +185,7 @@ intel_unmap_renderbuffer(struct gl_context *ctx,
DBG("%s: rb %d (%s)\n", __FUNCTION__,
rb->Name, _mesa_get_format_name(rb->Format));
- if (!irb && rb->Data) {
+ if (!irb && rb->Buffer) {
/* this is a malloc'd renderbuffer (accum buffer) */
/* nothing to do */
return;
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 19da7028e8a..f7cb3c24a58 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -265,7 +265,7 @@ swrast_delete_renderbuffer(struct gl_renderbuffer *rb)
{
TRACE;
- free(rb->Data);
+ free(rb->Buffer);
free(rb);
}
@@ -289,7 +289,7 @@ swrast_alloc_front_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
(void) ctx;
(void) internalFormat;
- rb->Data = NULL;
+ rb->Buffer = NULL;
rb->Width = width;
rb->Height = height;
xrb->pitch = bytes_per_line(width * xrb->bpp, 32);
@@ -305,11 +305,11 @@ swrast_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
TRACE;
- free(rb->Data);
+ free(rb->Buffer);
swrast_alloc_front_storage(ctx, rb, internalFormat, width, height);
- rb->Data = malloc(height * xrb->pitch);
+ rb->Buffer = malloc(height * xrb->pitch);
return GL_TRUE;
}
@@ -380,7 +380,7 @@ swrast_map_renderbuffer(struct gl_context *ctx,
GLint *out_stride)
{
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
- GLubyte *map = rb->Data;
+ GLubyte *map = rb->Buffer;
int cpp = _mesa_get_format_bytes(rb->Format);
int stride = rb->Width * cpp;
@@ -395,18 +395,18 @@ swrast_map_renderbuffer(struct gl_context *ctx,
xrb->map_h = h;
stride = w * cpp;
- rb->Data = malloc(h * stride);
+ rb->Buffer = malloc(h * stride);
sPriv->swrast_loader->getImage(dPriv, x, y, w, h,
- (char *)rb->Data,
+ (char *)rb->Buffer,
dPriv->loaderPrivate);
- *out_map = rb->Data;
+ *out_map = rb->Buffer;
*out_stride = stride;
return;
}
- ASSERT(rb->Data);
+ ASSERT(rb->Buffer);
if (rb->AllocStorage == swrast_alloc_back_storage) {
map += (rb->Height - 1) * stride;
@@ -434,12 +434,12 @@ swrast_unmap_renderbuffer(struct gl_context *ctx,
sPriv->swrast_loader->putImage(dPriv, __DRI_SWRAST_IMAGE_OP_DRAW,
xrb->map_x, xrb->map_y,
xrb->map_w, xrb->map_h,
- rb->Data,
+ rb->Buffer,
dPriv->loaderPrivate);
}
- free(rb->Data);
- rb->Data = NULL;
+ free(rb->Buffer);
+ rb->Buffer = NULL;
}
}
@@ -556,7 +556,7 @@ dri_swap_buffers(__DRIdrawable * dPriv)
0, 0,
frontrb->Base.Width,
frontrb->Base.Height,
- backrb->Base.Data,
+ backrb->Base.Buffer,
dPriv->loaderPrivate);
}
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 5c1a3f3b783..1c4f52b7cd2 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -354,7 +354,7 @@ static void
compute_row_addresses( OSMesaContext osmesa )
{
GLint bytesPerRow, i;
- GLubyte *origin = (GLubyte *) osmesa->rb->Data;
+ GLubyte *origin = (GLubyte *) osmesa->rb->Buffer;
GLint rowlength; /* in pixels */
GLint height = osmesa->rb->Height;
@@ -383,7 +383,7 @@ compute_row_addresses( OSMesaContext osmesa )
/**
- * Don't use _mesa_delete_renderbuffer since we can't free rb->Data.
+ * Don't use _mesa_delete_renderbuffer since we can't free rb->Buffer.
*/
static void
osmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
@@ -891,7 +891,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
/* Set renderbuffer fields. Set width/height = 0 to force
* osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer()
*/
- osmesa->rb->Data = buffer;
+ osmesa->rb->Buffer = buffer;
osmesa->rb->Width = osmesa->rb->Height = 0;
/* Set the framebuffer's size. This causes the
@@ -1024,7 +1024,7 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
if (c->gl_buffer)
rb = c->gl_buffer->Attachment[BUFFER_DEPTH].Renderbuffer;
- if (!rb || !rb->Data) {
+ if (!rb || !rb->Buffer) {
*width = 0;
*height = 0;
*bytesPerValue = 0;
@@ -1038,7 +1038,7 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
*bytesPerValue = sizeof(GLushort);
else
*bytesPerValue = sizeof(GLuint);
- *buffer = rb->Data;
+ *buffer = (void *) rb->Buffer;
return GL_TRUE;
}
}
@@ -1056,11 +1056,11 @@ GLAPI GLboolean GLAPIENTRY
OSMesaGetColorBuffer( OSMesaContext osmesa, GLint *width,
GLint *height, GLint *format, void **buffer )
{
- if (osmesa->rb && osmesa->rb->Data) {
+ if (osmesa->rb && osmesa->rb->Buffer) {
*width = osmesa->rb->Width;
*height = osmesa->rb->Height;
*format = osmesa->format;
- *buffer = osmesa->rb->Data;
+ *buffer = (void *) osmesa->rb->Buffer;
return GL_TRUE;
}
else {
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index bdee2a2a341..d0374ec121a 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1484,7 +1484,7 @@ GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height,
{
struct gl_renderbuffer *rb
= b->mesa_buffer.Attachment[BUFFER_DEPTH].Renderbuffer;
- if (!rb || !rb->Data) {
+ if (!rb || !rb->Buffer) {
*width = 0;
*height = 0;
*bytesPerValue = 0;
@@ -1496,7 +1496,7 @@ GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height,
*height = b->mesa_buffer.Height;
*bytesPerValue = b->mesa_buffer.Visual.depthBits <= 16
? sizeof(GLushort) : sizeof(GLuint);
- *buffer = rb->Data;
+ *buffer = (void *) rb->Buffer;
return GL_TRUE;
}
}