aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 21:46:33 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 21:46:33 +0100
commit96e2556031c8aff62a4650b9cfb814991f5240e1 (patch)
tree78bbb0c52085036b2a3ff82b29f242173bf39eda /nx-X11/programs/Xserver/render
parent89ccf26d65a3f205e54d9f6240b672f970e7b9c1 (diff)
parent09ef99919c010801bd4220d482a867035b6f4f25 (diff)
downloadnx-libs-96e2556031c8aff62a4650b9cfb814991f5240e1.tar.gz
nx-libs-96e2556031c8aff62a4650b9cfb814991f5240e1.tar.bz2
nx-libs-96e2556031c8aff62a4650b9cfb814991f5240e1.zip
Merge branch 'uli42-pr/remove_allocate_local' into 3.6.x
Attribute GH PR #369: https://github.com/ArcticaProject/nx-libs/pull/369
Diffstat (limited to 'nx-X11/programs/Xserver/render')
-rw-r--r--nx-X11/programs/Xserver/render/mitri.c8
-rw-r--r--nx-X11/programs/Xserver/render/render.c44
2 files changed, 26 insertions, 26 deletions
diff --git a/nx-X11/programs/Xserver/render/mitri.c b/nx-X11/programs/Xserver/render/mitri.c
index bc2641895..9adc7180e 100644
--- a/nx-X11/programs/Xserver/render/mitri.c
+++ b/nx-X11/programs/Xserver/render/mitri.c
@@ -145,7 +145,7 @@ miTriStrip (CARD8 op,
if (npoint < 3)
return;
ntri = npoint - 2;
- tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
+ tris = malloc (ntri * sizeof (xTriangle));
if (!tris)
return;
for (tri = tris; npoint >= 3; npoint--, points++, tri++)
@@ -155,7 +155,7 @@ miTriStrip (CARD8 op,
tri->p3 = points[2];
}
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
- DEALLOCATE_LOCAL (tris);
+ free (tris);
}
void
@@ -177,7 +177,7 @@ miTriFan (CARD8 op,
if (npoint < 3)
return;
ntri = npoint - 2;
- tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
+ tris = malloc (ntri * sizeof (xTriangle));
if (!tris)
return;
first = points++;
@@ -188,5 +188,5 @@ miTriFan (CARD8 op,
tri->p3 = points[1];
}
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
- DEALLOCATE_LOCAL (tris);
+ free (tris);
}
diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c
index abc26b5d9..43cb430aa 100644
--- a/nx-X11/programs/Xserver/render/render.c
+++ b/nx-X11/programs/Xserver/render/render.c
@@ -1338,7 +1338,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
glyphsBase = glyphsLocal;
else
{
- glyphsBase = (GlyphPtr *) ALLOCATE_LOCAL (nglyph * sizeof (GlyphPtr));
+ glyphsBase = (GlyphPtr *) malloc (nglyph * sizeof (GlyphPtr));
if (!glyphsBase)
return BadAlloc;
}
@@ -1346,7 +1346,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
listsBase = listsLocal;
else
{
- listsBase = (GlyphListPtr) ALLOCATE_LOCAL (nlist * sizeof (GlyphListRec));
+ listsBase = (GlyphListPtr) malloc (nlist * sizeof (GlyphListRec));
if (!listsBase)
return BadAlloc;
}
@@ -1371,9 +1371,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
{
client->errorValue = gs;
if (glyphsBase != glyphsLocal)
- DEALLOCATE_LOCAL (glyphsBase);
+ free (glyphsBase);
if (listsBase != listsLocal)
- DEALLOCATE_LOCAL (listsBase);
+ free (listsBase);
return RenderErrBase + BadGlyphSet;
}
}
@@ -1427,9 +1427,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
glyphsBase);
if (glyphsBase != glyphsLocal)
- DEALLOCATE_LOCAL (glyphsBase);
+ free (glyphsBase);
if (listsBase != listsLocal)
- DEALLOCATE_LOCAL (listsBase);
+ free (listsBase);
return client->noClientException;
}
@@ -2893,7 +2893,7 @@ PanoramiXRenderFillRectangles (ClientPtr client)
RenderErrBase + BadPicture);
extra_len = (client->req_len << 2) - sizeof (xRenderFillRectanglesReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len)))
+ (extra = (char *) malloc (extra_len)))
{
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -2919,7 +2919,7 @@ PanoramiXRenderFillRectangles (ClientPtr client)
result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client);
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -2944,7 +2944,7 @@ PanoramiXRenderTrapezoids(ClientPtr client)
extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ (extra = (char *) malloc (extra_len))) {
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -2981,7 +2981,7 @@ PanoramiXRenderTrapezoids(ClientPtr client)
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -3006,7 +3006,7 @@ PanoramiXRenderTriangles(ClientPtr client)
extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ (extra = (char *) malloc (extra_len))) {
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -3039,7 +3039,7 @@ PanoramiXRenderTriangles(ClientPtr client)
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -3064,7 +3064,7 @@ PanoramiXRenderTriStrip(ClientPtr client)
extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ (extra = (char *) malloc (extra_len))) {
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -3093,7 +3093,7 @@ PanoramiXRenderTriStrip(ClientPtr client)
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -3118,7 +3118,7 @@ PanoramiXRenderTriFan(ClientPtr client)
extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ (extra = (char *) malloc (extra_len))) {
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -3147,7 +3147,7 @@ PanoramiXRenderTriFan(ClientPtr client)
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -3172,7 +3172,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
extra_len = (client->req_len << 2) - sizeof (xRenderColorTrapezoidsReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ (extra = (char *) malloc (extra_len))) {
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -3193,7 +3193,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -3216,7 +3216,7 @@ PanoramiXRenderColorTriangles(ClientPtr client)
extra_len = (client->req_len << 2) - sizeof (xRenderColorTrianglesReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ (extra = (char *) malloc (extra_len))) {
memcpy (extra, stuff + 1, extra_len);
FOR_NSCREENS_FORWARD(j) {
@@ -3237,7 +3237,7 @@ PanoramiXRenderColorTriangles(ClientPtr client)
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;
@@ -3260,7 +3260,7 @@ PanoramiXRenderAddTraps (ClientPtr client)
RenderErrBase + BadPicture);
extra_len = (client->req_len << 2) - sizeof (xRenderAddTrapsReq);
if (extra_len &&
- (extra = (char *) ALLOCATE_LOCAL (extra_len)))
+ (extra = (char *) malloc (extra_len)))
{
memcpy (extra, stuff + 1, extra_len);
x_off = stuff->xOff;
@@ -3277,7 +3277,7 @@ PanoramiXRenderAddTraps (ClientPtr client)
result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
if(result != Success) break;
}
- DEALLOCATE_LOCAL(extra);
+ free(extra);
}
return result;