summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_copypix.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-02-19 11:58:49 -0500
committerKristian Høgsberg <[email protected]>2010-02-19 12:03:01 -0500
commit32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (patch)
tree5c44742f6d4f8711b6d1ca31d68d3245abd0187a /src/mesa/swrast/s_copypix.c
parent6bf1ea897fa470af58fe8916dff45e2da79634a3 (diff)
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Diffstat (limited to 'src/mesa/swrast/s_copypix.c')
-rw-r--r--src/mesa/swrast/s_copypix.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index b69be50f519..3f37c027e4a 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -114,14 +114,14 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
span.arrayAttribs = FRAG_BIT_COL0;
/* allocate space for GLfloat image */
- tmpImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ tmpImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
if (!tmpImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels");
return;
}
- convImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ convImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
if (!convImage) {
- _mesa_free(tmpImage);
+ free(tmpImage);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels");
return;
}
@@ -150,7 +150,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
ASSERT(ctx->Pixel.Separable2DEnabled);
_mesa_convolve_sep_image(ctx, &width, &height, tmpImage, convImage);
}
- _mesa_free(tmpImage);
+ free(tmpImage);
/* do remaining post-convolution image transfer ops */
for (row = 0; row < height; row++) {
@@ -185,7 +185,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
span.array->ChanType = CHAN_TYPE;
}
- _mesa_free(convImage);
+ free(convImage);
}
@@ -246,7 +246,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
span.arrayAttribs = FRAG_BIT_COL0; /* we'll fill in COL0 attrib values */
if (overlapping) {
- tmpImage = (GLfloat *) _mesa_malloc(width * height * sizeof(GLfloat) * 4);
+ tmpImage = (GLfloat *) malloc(width * height * sizeof(GLfloat) * 4);
if (!tmpImage) {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
return;
@@ -303,7 +303,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
span.array->ChanType = CHAN_TYPE; /* restore */
if (overlapping)
- _mesa_free(tmpImage);
+ free(tmpImage);
}
@@ -352,7 +352,7 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
if (overlapping) {
GLint ssy = sy;
- tmpImage = (GLuint *) _mesa_malloc(width * height * sizeof(GLuint));
+ tmpImage = (GLuint *) malloc(width * height * sizeof(GLuint));
if (!tmpImage) {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
return;
@@ -397,7 +397,7 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
}
if (overlapping)
- _mesa_free(tmpImage);
+ free(tmpImage);
}
@@ -487,7 +487,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
if (overlapping) {
GLint ssy = sy;
- tmpImage = (GLfloat *) _mesa_malloc(width * height * sizeof(GLfloat));
+ tmpImage = (GLfloat *) malloc(width * height * sizeof(GLfloat));
if (!tmpImage) {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
return;
@@ -537,7 +537,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
}
if (overlapping)
- _mesa_free(tmpImage);
+ free(tmpImage);
}
@@ -584,7 +584,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
if (overlapping) {
GLint ssy = sy;
- tmpImage = (GLstencil *) _mesa_malloc(width * height * sizeof(GLstencil));
+ tmpImage = (GLstencil *) malloc(width * height * sizeof(GLstencil));
if (!tmpImage) {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
return;
@@ -626,7 +626,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
}
if (overlapping)
- _mesa_free(tmpImage);
+ free(tmpImage);
}
@@ -688,7 +688,7 @@ copy_depth_stencil_pixels(GLcontext *ctx,
if (stencilMask != 0x0) {
tempStencilImage
- = (GLstencil *) _mesa_malloc(width * height * sizeof(GLstencil));
+ = (GLstencil *) malloc(width * height * sizeof(GLstencil));
if (!tempStencilImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels");
return;
@@ -706,10 +706,10 @@ copy_depth_stencil_pixels(GLcontext *ctx,
if (ctx->Depth.Mask) {
tempDepthImage
- = (GLfloat *) _mesa_malloc(width * height * sizeof(GLfloat));
+ = (GLfloat *) malloc(width * height * sizeof(GLfloat));
if (!tempDepthImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels");
- _mesa_free(tempStencilImage);
+ free(tempStencilImage);
return;
}
@@ -799,10 +799,10 @@ copy_depth_stencil_pixels(GLcontext *ctx,
}
if (tempStencilImage)
- _mesa_free(tempStencilImage);
+ free(tempStencilImage);
if (tempDepthImage)
- _mesa_free(tempDepthImage);
+ free(tempDepthImage);
}