Commit 56aaea90 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Render.c: Code simplifications

Save some lines...
parent 6275bbc6
...@@ -211,8 +211,6 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -211,8 +211,6 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
int bitsToClean; int bitsToClean;
int widthInBytes; int widthInBytes;
int height = gi -> height; int height = gi -> height;
register int i;
int j;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCleanGlyphs: Found a Glyph with Depth %d, width %d, pad %d.\n", fprintf(stderr, "nxagentCleanGlyphs: Found a Glyph with Depth %d, width %d, pad %d.\n",
...@@ -237,14 +235,14 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -237,14 +235,14 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
if (ImageByteOrder(dpy) == LSBFirst) if (ImageByteOrder(dpy) == LSBFirst)
{ {
for (i = 3; i < bytesToClean; i += 4) for (int i = 3; i < bytesToClean; i += 4)
{ {
images[i] = 0x00; images[i] = 0x00;
} }
} }
else else
{ {
for (i = 0; i < bytesToClean; i += 4) for (int i = 0; i < bytesToClean; i += 4)
{ {
images[i] = 0x00; images[i] = 0x00;
} }
...@@ -252,7 +250,7 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -252,7 +250,7 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
#ifdef DUMP #ifdef DUMP
fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean); fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean);
for (i = 0; i < bytesPerLine; i++) for (int i = 0; i < bytesPerLine; i++)
{ {
fprintf(stderr, "[%d]", images[i]); fprintf(stderr, "[%d]", images[i]);
} }
...@@ -288,8 +286,9 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -288,8 +286,9 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
ImageByteOrder(dpy), BitmapBitOrder(dpy)); ImageByteOrder(dpy), BitmapBitOrder(dpy));
#endif #endif
for (i = 1; i <= height; i++) for (int i = 1; i <= height; i++)
{ {
int j;
if (ImageByteOrder(dpy) == BitmapBitOrder(dpy)) if (ImageByteOrder(dpy) == BitmapBitOrder(dpy))
{ {
for (j = 1; j <= bytesToClean; j++) for (j = 1; j <= bytesToClean; j++)
...@@ -339,7 +338,7 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -339,7 +338,7 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
#ifdef DUMP #ifdef DUMP
fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean); fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean);
for (i = 0; i < bytesPerLine; i++) for (int i = 0; i < bytesPerLine; i++)
{ {
fprintf(stderr, "[%d]", images[i]); fprintf(stderr, "[%d]", images[i]);
} }
...@@ -375,22 +374,22 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -375,22 +374,22 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
{ {
while (height > 0) while (height > 0)
{ {
i = bytesToClean; int count = bytesToClean;
while (i > 0) while (count > 0)
{ {
*(images + (bytesPerLine - i)) = 0; *(images + (bytesPerLine - count)) = 0;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n"); fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n");
#endif #endif
i--; count--;
} }
#ifdef DUMP #ifdef DUMP
fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean); fprintf(stderr, "nxagentCleanGlyphs: depth %d, bytesToClean %d, scanline: ", depth, bytesToClean);
for (i = 0; i < bytesPerLine; i++) for (int i = 0; i < bytesPerLine; i++)
{ {
fprintf(stderr, "[%d]", images[i]); fprintf(stderr, "[%d]", images[i]);
} }
...@@ -564,9 +563,6 @@ int nxagentCreatePicture(PicturePtr pPicture, Mask mask) ...@@ -564,9 +563,6 @@ int nxagentCreatePicture(PicturePtr pPicture, Mask mask)
{ {
XRenderPictureAttributes attributes; XRenderPictureAttributes attributes;
unsigned long valuemask=0; unsigned long valuemask=0;
XRenderPictFormat *pForm;
Picture id;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCreatePicture: Function called with picture at [%p] and mask [%ld].\n", fprintf(stderr, "nxagentCreatePicture: Function called with picture at [%p] and mask [%ld].\n",
...@@ -721,7 +717,7 @@ int nxagentCreatePicture(PicturePtr pPicture, Mask mask) ...@@ -721,7 +717,7 @@ int nxagentCreatePicture(PicturePtr pPicture, Mask mask)
nxagentSetPictureRemoteValue(pPicture, component_alpha, attributes.component_alpha); nxagentSetPictureRemoteValue(pPicture, component_alpha, attributes.component_alpha);
} }
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (pPicture -> pFormat != NULL) if (pPicture -> pFormat != NULL)
{ {
...@@ -732,15 +728,14 @@ int nxagentCreatePicture(PicturePtr pPicture, Mask mask) ...@@ -732,15 +728,14 @@ int nxagentCreatePicture(PicturePtr pPicture, Mask mask)
if (pForm == NULL) if (pForm == NULL)
{ {
fprintf(stderr, "nxagentCreatePicture: WARNING! The requested format was not found.\n"); fprintf(stderr, "nxagentCreatePicture: WARNING! The requested format was not found.\n");
return 0; return 0;
} }
id = XRenderCreatePicture(nxagentDisplay, Picture id = XRenderCreatePicture(nxagentDisplay,
nxagentDrawable(pPicture -> pDrawable), nxagentDrawable(pPicture -> pDrawable),
pForm, pForm,
valuemask, valuemask,
&attributes); &attributes);
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentCreatePicture: Created picture at [%p] with drawable at [%p].\n", fprintf(stderr, "nxagentCreatePicture: Created picture at [%p] with drawable at [%p].\n",
...@@ -1065,19 +1060,15 @@ void nxagentChangePicture(PicturePtr pPicture, Mask mask) ...@@ -1065,19 +1060,15 @@ void nxagentChangePicture(PicturePtr pPicture, Mask mask)
if (mask & CPSubwindowMode) if (mask & CPSubwindowMode)
{ {
attributes.subwindow_mode = pPicture -> subWindowMode; attributes.subwindow_mode = pPicture -> subWindowMode;
if (nxagentCheckPictureRemoteValue(pPicture, subwindow_mode, attributes.subwindow_mode) == 0) if (nxagentCheckPictureRemoteValue(pPicture, subwindow_mode, attributes.subwindow_mode) == 0)
{ {
valuemask |= CPSubwindowMode; valuemask |= CPSubwindowMode;
nxagentSetPictureRemoteValue(pPicture, subwindow_mode, attributes.subwindow_mode); nxagentSetPictureRemoteValue(pPicture, subwindow_mode, attributes.subwindow_mode);
} }
} }
if (mask & CPClipMask) if (mask & CPClipMask)
{ {
attributes.clip_mask = None;
/* /*
* The nxagent doesn't know the remote id of * The nxagent doesn't know the remote id of
* the picture's clip mask, so the clip_mask * the picture's clip mask, so the clip_mask
...@@ -1086,10 +1077,10 @@ void nxagentChangePicture(PicturePtr pPicture, Mask mask) ...@@ -1086,10 +1077,10 @@ void nxagentChangePicture(PicturePtr pPicture, Mask mask)
* 1. * 1.
*/ */
attributes.clip_mask = None;
if (nxagentPicturePriv(pPicture) -> lastServerValues.clip_mask != 0) if (nxagentPicturePriv(pPicture) -> lastServerValues.clip_mask != 0)
{ {
valuemask |= CPClipMask; valuemask |= CPClipMask;
nxagentSetPictureRemoteValue(pPicture, clip_mask, 0); nxagentSetPictureRemoteValue(pPicture, clip_mask, 0);
} }
} }
...@@ -1188,15 +1179,12 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD ...@@ -1188,15 +1179,12 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
INT16 yDst, CARD16 width, CARD16 height) INT16 yDst, CARD16 width, CARD16 height)
{ {
RegionPtr pDstRegion;
if (pSrc == NULL || pDst == NULL) if (pSrc == NULL || pDst == NULL)
{ {
return; return;
} }
#ifdef DEBUG #ifdef DEBUG
if (pSrc && pSrc -> pDrawable != NULL) if (pSrc && pSrc -> pDrawable != NULL)
{ {
fprintf(stderr, "nxagentComposite: Source Picture [%lu][%p] with drawable [%s%s][%p].\n", fprintf(stderr, "nxagentComposite: Source Picture [%lu][%p] with drawable [%s%s][%p].\n",
...@@ -1225,12 +1213,11 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD ...@@ -1225,12 +1213,11 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
pMask -> pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window", pMask -> pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window",
(void *) pMask -> pDrawable); (void *) pMask -> pDrawable);
} }
#endif #endif
if (NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst)) if (NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst))
{ {
pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst, width, height); RegionPtr pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst, width, height);
#ifdef TEST #ifdef TEST
if ((pDstRegion) && (pDst && pDst->pDrawable)) { if ((pDstRegion) && (pDst && pDst->pDrawable)) {
...@@ -1343,23 +1330,10 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1343,23 +1330,10 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlists, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlists,
XGlyphElt8 *elts, int sizeID, GlyphPtr *glyphsBase) XGlyphElt8 *elts, int sizeID, GlyphPtr *glyphsBase)
{ {
XRenderPictFormat *pForm;
BoxRec glyphBox; BoxRec glyphBox;
XGlyphElt8 *elements; XGlyphElt8 *elements;
#ifdef SPLIT_GLYPH_LISTS
GlyphPtr glyph;
int x;
int y;
int i;
int j;
#endif /* #ifdef SPLIT_GLYPH_LISTS */
if (pSrc == NULL || pDst == NULL) if (pSrc == NULL || pDst == NULL)
{ {
return; return;
...@@ -1374,7 +1348,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1374,7 +1348,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
} }
#endif #endif
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (maskFormat != NULL) if (maskFormat != NULL)
{ {
...@@ -1421,10 +1395,8 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1421,10 +1395,8 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (pDst -> pDrawable -> type == DRAWABLE_WINDOW) if (pDst -> pDrawable -> type == DRAWABLE_WINDOW)
{ {
RegionPtr pRegion; RegionPtr pRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, glyphBox.x1, glyphBox.y1,
glyphBox.x2 - glyphBox.x1, glyphBox.y2 - glyphBox.y1);
pRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, glyphBox.x1, glyphBox.y1,
glyphBox.x2 - glyphBox.x1, glyphBox.y2 - glyphBox.y1);
if (RegionNil(pRegion) == 1) if (RegionNil(pRegion) == 1)
{ {
...@@ -1562,6 +1534,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1562,6 +1534,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
#endif #endif
#ifdef SPLIT_GLYPH_LISTS #ifdef SPLIT_GLYPH_LISTS
GlyphPtr glyph;
/* /*
* We split glyphs lists here and recalculate * We split glyphs lists here and recalculate
...@@ -1577,7 +1550,10 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1577,7 +1550,10 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (nlists > 1) if (nlists > 1)
{ {
for (j = 1; j < nlists; j++) int x;
int y;
for (int j = 1; j < nlists; j++)
{ {
x = elements -> xOff; x = elements -> xOff;
y = elements -> yOff; y = elements -> yOff;
...@@ -1587,7 +1563,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1587,7 +1563,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
j, nlists, elements -> xOff, elements -> yOff); j, nlists, elements -> xOff, elements -> yOff);
#endif #endif
for (i = 0; i < elements -> nchars; i++) for (int i = 0; i < elements -> nchars; i++)
{ {
glyph = *glyphsBase++; glyph = *glyphsBase++;
...@@ -1619,7 +1595,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1619,7 +1595,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
{ {
case 1: case 1:
{ {
for (j = 0; j < nlists; j++) for (int j = 0; j < nlists; j++)
{ {
XRenderCompositeText8(nxagentDisplay, XRenderCompositeText8(nxagentDisplay,
op, op,
...@@ -1640,7 +1616,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1640,7 +1616,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
} }
case 2: case 2:
{ {
for (j = 0; j < nlists; j++) for (int j = 0; j < nlists; j++)
{ {
XRenderCompositeText16(nxagentDisplay, XRenderCompositeText16(nxagentDisplay,
op, op,
...@@ -1661,7 +1637,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1661,7 +1637,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
} }
case 4: case 4:
{ {
for (j = 0; j < nlists; j++) for (int j = 0; j < nlists; j++)
{ {
XRenderCompositeText32(nxagentDisplay, XRenderCompositeText32(nxagentDisplay,
op, op,
...@@ -1751,19 +1727,15 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1751,19 +1727,15 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
fprintf(stderr, "nxagentGlyphs: WARNING! Invalid size id [%d].\n", fprintf(stderr, "nxagentGlyphs: WARNING! Invalid size id [%d].\n",
sizeID); sizeID);
#endif #endif
break; break;
} }
} }
#endif /* #ifdef SPLIT_GLYPH_LISTS */ #endif /* #ifdef SPLIT_GLYPH_LISTS */
} }
void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
int nRect, xRectangle *rects) int nRect, xRectangle *rects)
{ {
RegionPtr rectRegion;
if (pDst == NULL) if (pDst == NULL)
{ {
return; return;
...@@ -1788,7 +1760,7 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, ...@@ -1788,7 +1760,7 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
(op == PictOpSrc || (op == PictOpSrc ||
(op == PictOpOver && color -> alpha == 0xffff))) (op == PictOpOver && color -> alpha == 0xffff)))
{ {
rectRegion = RegionFromRects(nRect, rects, CT_REGION); RegionPtr rectRegion = RegionFromRects(nRect, rects, CT_REGION);
if (pDst -> clientClipType != CT_NONE) if (pDst -> clientClipType != CT_NONE)
{ {
...@@ -1834,12 +1806,8 @@ void nxagentTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1834,12 +1806,8 @@ void nxagentTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntrap, xTrapezoid *traps) int ntrap, xTrapezoid *traps)
{ {
XRenderPictFormat *pForm;
XTrapezoid *current = (XTrapezoid *) traps; XTrapezoid *current = (XTrapezoid *) traps;
RegionPtr pDstRegion;
int remaining = ntrap; int remaining = ntrap;
#ifdef TEST #ifdef TEST
...@@ -1853,7 +1821,7 @@ void nxagentTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1853,7 +1821,7 @@ void nxagentTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
return; return;
} }
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (maskFormat != NULL) if (maskFormat != NULL)
{ {
...@@ -1924,11 +1892,11 @@ FIXME: Is this useful or just a waste of bandwidth? ...@@ -1924,11 +1892,11 @@ FIXME: Is this useful or just a waste of bandwidth?
if (NXAGENT_SHOULD_DEFER_TRAPEZOIDS(pDst -> pDrawable)) if (NXAGENT_SHOULD_DEFER_TRAPEZOIDS(pDst -> pDrawable))
{ {
pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, RegionPtr pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL,
nxagentTrapezoidExtents -> x1, nxagentTrapezoidExtents -> x1,
nxagentTrapezoidExtents -> y1, nxagentTrapezoidExtents -> y1,
nxagentTrapezoidExtents -> x2 - nxagentTrapezoidExtents -> x1, nxagentTrapezoidExtents -> x2 - nxagentTrapezoidExtents -> x1,
nxagentTrapezoidExtents -> y2 - nxagentTrapezoidExtents -> y1); nxagentTrapezoidExtents -> y2 - nxagentTrapezoidExtents -> y1);
#ifdef TEST #ifdef TEST
if (pDst && pDst->pDrawable) { if (pDst && pDst->pDrawable) {
...@@ -1973,14 +1941,14 @@ FIXME: Is this useful or just a waste of bandwidth? ...@@ -1973,14 +1941,14 @@ FIXME: Is this useful or just a waste of bandwidth?
nxagentSynchronizeBox(pDst -> pDrawable, nxagentTrapezoidExtents, NEVER_BREAK); nxagentSynchronizeBox(pDst -> pDrawable, nxagentTrapezoidExtents, NEVER_BREAK);
} }
XRenderCompositeTrapezoids(nxagentDisplay, XRenderCompositeTrapezoids(nxagentDisplay,
op, op,
nxagentPicturePriv(pSrc) -> picture, nxagentPicturePriv(pSrc) -> picture,
nxagentPicturePriv(pDst) -> picture, nxagentPicturePriv(pDst) -> picture,
pForm, pForm,
xSrc, xSrc,
ySrc, ySrc,
(XTrapezoid *) current,remaining); (XTrapezoid *) current,remaining);
#endif #endif
...@@ -1994,8 +1962,6 @@ void nxagentTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -1994,8 +1962,6 @@ void nxagentTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntri, xTriangle *tris) int ntri, xTriangle *tris)
{ {
XRenderPictFormat *pForm;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentTriangles: Source [%p] Destination [%p] Coordinates [%d,%d] Elements [%d].\n", fprintf(stderr, "nxagentTriangles: Source [%p] Destination [%p] Coordinates [%d,%d] Elements [%d].\n",
(void *) pSrc, (void *) pDst, xSrc, ySrc, ntri); (void *) pSrc, (void *) pDst, xSrc, ySrc, ntri);
...@@ -2006,7 +1972,7 @@ void nxagentTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -2006,7 +1972,7 @@ void nxagentTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
return; return;
} }
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (maskFormat != NULL) if (maskFormat != NULL)
{ {
...@@ -2065,8 +2031,6 @@ void nxagentTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -2065,8 +2031,6 @@ void nxagentTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int npoint, xPointFixed *points) int npoint, xPointFixed *points)
{ {
XRenderPictFormat *pForm;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentTriStrip: Source [%p] Destination [%p] Coordinates [%d,%d] Elements [%d].\n", fprintf(stderr, "nxagentTriStrip: Source [%p] Destination [%p] Coordinates [%d,%d] Elements [%d].\n",
(void *) pSrc, (void *) pDst, xSrc, ySrc, npoint); (void *) pSrc, (void *) pDst, xSrc, ySrc, npoint);
...@@ -2077,7 +2041,7 @@ void nxagentTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -2077,7 +2041,7 @@ void nxagentTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
return; return;
} }
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (maskFormat != NULL) if (maskFormat != NULL)
{ {
...@@ -2136,8 +2100,6 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -2136,8 +2100,6 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int npoint, xPointFixed *points) int npoint, xPointFixed *points)
{ {
XRenderPictFormat *pForm;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentTriFan: Source [%p] Destination [%p] Coordinates [%d,%d] Elements [%d].\n", fprintf(stderr, "nxagentTriFan: Source [%p] Destination [%p] Coordinates [%d,%d] Elements [%d].\n",
(void *) pSrc, (void *) pDst, xSrc, ySrc, npoint); (void *) pSrc, (void *) pDst, xSrc, ySrc, npoint);
...@@ -2148,7 +2110,7 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -2148,7 +2110,7 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
return; return;
} }
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (maskFormat != NULL) if (maskFormat != NULL)
{ {
...@@ -2205,31 +2167,27 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ...@@ -2205,31 +2167,27 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
void nxagentQueryFormats(void) void nxagentQueryFormats(void)
{ {
XRenderInfo *xri;
XExtDisplayInfo *info = NULL;
XRenderPictFormat *pformat=NULL;
int i;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentQueryFormats.\n"); fprintf(stderr, "nxagentQueryFormats.\n");
#endif #endif
if (XRenderQueryFormats(nxagentDisplay)) if (XRenderQueryFormats(nxagentDisplay))
{ {
int i;
#ifdef DEBUG #ifdef DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
#endif #endif
info = (XExtDisplayInfo *) XRenderFindDisplay(nxagentDisplay); XExtDisplayInfo *info = (XExtDisplayInfo *) XRenderFindDisplay(nxagentDisplay);
#ifdef DEBUG #ifdef DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
#endif #endif
xri = (XRenderInfo *) info -> data; XRenderInfo *xri = (XRenderInfo *) info -> data;
pformat = xri -> format; XRenderPictFormat *pformat = xri -> format;
for (i = 0; i < xri -> nformat; i++) for (i = 0; i < xri -> nformat; i++)
{ {
...@@ -2269,13 +2227,11 @@ void nxagentQueryFormats(void) ...@@ -2269,13 +2227,11 @@ void nxagentQueryFormats(void)
void nxagentCreateGlyphSet(GlyphSetPtr pGly) void nxagentCreateGlyphSet(GlyphSetPtr pGly)
{ {
XRenderPictFormat *pForm;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCreateGlyphSet: Glyphset at [%p].\n", (void *) pGly); fprintf(stderr, "nxagentCreateGlyphSet: Glyphset at [%p].\n", (void *) pGly);
#endif #endif
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (pGly -> format != NULL) if (pGly -> format != NULL)
{ {
...@@ -2328,13 +2284,6 @@ void nxagentFreeGlyphSet(GlyphSetPtr glyphSet) ...@@ -2328,13 +2284,6 @@ void nxagentFreeGlyphSet(GlyphSetPtr glyphSet)
void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
int nglyphs, CARD8 *images, int sizeImages) int nglyphs, CARD8 *images, int sizeImages)
{ {
GlyphRefPtr gr;
Glyph *tempGids;
int i;
CARD8 *normalizedImages;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentAddGlyphs: Glyphset at [%p]. Number of glyphs [%d].\n", fprintf(stderr, "nxagentAddGlyphs: Glyphset at [%p]. Number of glyphs [%d].\n",
(void *) glyphSet, nglyphs); (void *) glyphSet, nglyphs);
...@@ -2356,12 +2305,12 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, ...@@ -2356,12 +2305,12 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
* as synchronized. * as synchronized.
*/ */
tempGids = gids; for (int i = 0; i < nglyphs; i++)
for (i = 0; i < nglyphs; i++)
{ {
if ((gr = FindGlyphRef(&glyphSet -> hash, *tempGids, 0, 0)) && Glyph *tempGids = gids;
gr -> glyph != DeletedGlyph) GlyphRefPtr gr = FindGlyphRef(&glyphSet -> hash, *tempGids, 0, 0);
if (gr && gr -> glyph != DeletedGlyph)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentAddGlyphs: Added Glyph [%p][%ld] to glyphset [%p].\n", fprintf(stderr, "nxagentAddGlyphs: Added Glyph [%p][%ld] to glyphset [%p].\n",
...@@ -2374,7 +2323,7 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, ...@@ -2374,7 +2323,7 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
tempGids++; tempGids++;
} }
normalizedImages = NULL; CARD8 *normalizedImages = NULL;
if (sizeImages > 0) if (sizeImages > 0)
{ {
...@@ -2428,11 +2377,8 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, ...@@ -2428,11 +2377,8 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
void nxagentFreeGlyphs(GlyphSetPtr glyphSet, CARD32 *gids, int nglyph) void nxagentFreeGlyphs(GlyphSetPtr glyphSet, CARD32 *gids, int nglyph)
{ {
GlyphRefPtr gr; GlyphRefPtr gr;
CARD32 *tempGids;
Glyph gid; Glyph gid;
int i;
if (glyphSet -> remoteID == 0) if (glyphSet -> remoteID == 0)
{ {
#ifdef TEST #ifdef TEST
...@@ -2450,9 +2396,9 @@ void nxagentFreeGlyphs(GlyphSetPtr glyphSet, CARD32 *gids, int nglyph) ...@@ -2450,9 +2396,9 @@ void nxagentFreeGlyphs(GlyphSetPtr glyphSet, CARD32 *gids, int nglyph)
* they can be freed. * they can be freed.
*/ */
tempGids = gids; CARD32 *tempGids = gids;
for (i = 0; i < nglyph; i++) for (int i = 0; i < nglyph; i++)
{ {
gid = (Glyph)*tempGids; gid = (Glyph)*tempGids;
...@@ -2587,10 +2533,6 @@ static void nxagentPrintFormat(XRenderPictFormat *pFormat) ...@@ -2587,10 +2533,6 @@ static void nxagentPrintFormat(XRenderPictFormat *pFormat)
Bool nxagentFillGlyphSet(GlyphSetPtr pGly) Bool nxagentFillGlyphSet(GlyphSetPtr pGly)
{ {
GlyphPtr glyph;
int i;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentFillGlyphSet: GlyphSet at [%p] Refcount [%ld] Glyphs [%ld] " fprintf(stderr, "nxagentFillGlyphSet: GlyphSet at [%p] Refcount [%ld] Glyphs [%ld] "
"Format [%p] FDepth [%d] RemoteID [%ld].\n", (void *) pGly, pGly -> refcnt, "Format [%p] FDepth [%d] RemoteID [%ld].\n", (void *) pGly, pGly -> refcnt,
...@@ -2604,9 +2546,9 @@ Bool nxagentFillGlyphSet(GlyphSetPtr pGly) ...@@ -2604,9 +2546,9 @@ Bool nxagentFillGlyphSet(GlyphSetPtr pGly)
* corrupted the glyphs for each glyphset. * corrupted the glyphs for each glyphset.
*/ */
for (i = 0; i < pGly -> hash.hashSet -> size; i++) for (int i = 0; i < pGly -> hash.hashSet -> size; i++)
{ {
glyph = pGly -> hash.table[i].glyph; GlyphPtr glyph = pGly -> hash.table[i].glyph;
if (glyph && (glyph != DeletedGlyph)) if (glyph && (glyph != DeletedGlyph))
{ {
...@@ -2621,12 +2563,11 @@ void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2) ...@@ -2621,12 +2563,11 @@ void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2)
{ {
GlyphSetPtr pGly = (GlyphSetPtr) p0; GlyphSetPtr pGly = (GlyphSetPtr) p0;
XRenderPictFormat *pForm = NULL;
int i;
if (nxagentReconnectTrap == 0) if (nxagentReconnectTrap == 0)
{ {
int i;
XRenderPictFormat *pForm = NULL;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentReconnectGlyphSet: GlyphSet at [%p].\n", (void *) pGly); fprintf(stderr, "nxagentReconnectGlyphSet: GlyphSet at [%p].\n", (void *) pGly);
#endif #endif
...@@ -2667,7 +2608,6 @@ void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2) ...@@ -2667,7 +2608,6 @@ void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2)
Bool nxagentReconnectAllGlyphSet(void *p) Bool nxagentReconnectAllGlyphSet(void *p)
{ {
Bool success = True; Bool success = True;
int i;
nxagentQueryFormats(); nxagentQueryFormats();
...@@ -2675,7 +2615,7 @@ Bool nxagentReconnectAllGlyphSet(void *p) ...@@ -2675,7 +2615,7 @@ Bool nxagentReconnectAllGlyphSet(void *p)
fprintf(stderr, "nxagentReconnectAllGlyphSet\n"); fprintf(stderr, "nxagentReconnectAllGlyphSet\n");
#endif #endif
for (i = 0; (i < MAXCLIENTS) && (success); i++) for (int i = 0; (i < MAXCLIENTS) && (success); i++)
{ {
if (clients[i]) if (clients[i])
{ {
...@@ -2693,7 +2633,6 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2) ...@@ -2693,7 +2633,6 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2)
unsigned long mask = 0; unsigned long mask = 0;
XRenderPictureAttributes attributes; XRenderPictureAttributes attributes;
XRenderPictFormat *pForm;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentReconnectPicture: Called with bool [%d] and picture at [%p].\n", fprintf(stderr, "nxagentReconnectPicture: Called with bool [%d] and picture at [%p].\n",
...@@ -2716,9 +2655,8 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2) ...@@ -2716,9 +2655,8 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2)
if (pPicture -> repeat) if (pPicture -> repeat)
{ {
mask |= CPRepeat;
attributes.repeat = (Bool) pPicture -> repeat; attributes.repeat = (Bool) pPicture -> repeat;
mask |= CPRepeat;
} }
if (pPicture -> alphaMap) if (pPicture -> alphaMap)
...@@ -2736,38 +2674,31 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2) ...@@ -2736,38 +2674,31 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2)
attributes.alpha_map = nxagentPicture(pPicture -> alphaMap); attributes.alpha_map = nxagentPicture(pPicture -> alphaMap);
attributes.alpha_x_origin = pPicture -> alphaOrigin.x; attributes.alpha_x_origin = pPicture -> alphaOrigin.x;
attributes.alpha_y_origin = pPicture -> alphaOrigin.y; attributes.alpha_y_origin = pPicture -> alphaOrigin.y;
mask |= (CPAlphaMap | CPAlphaXOrigin | CPAlphaYOrigin); mask |= (CPAlphaMap | CPAlphaXOrigin | CPAlphaYOrigin);
} }
if (pPicture -> graphicsExposures) if (pPicture -> graphicsExposures)
{ {
attributes.graphics_exposures = pPicture -> graphicsExposures; attributes.graphics_exposures = pPicture -> graphicsExposures;
mask |= CPGraphicsExposure; mask |= CPGraphicsExposure;
} }
attributes.subwindow_mode = pPicture -> subWindowMode; attributes.subwindow_mode = pPicture -> subWindowMode;
mask |= CPSubwindowMode; mask |= CPSubwindowMode;
attributes.poly_edge = pPicture -> polyEdge; attributes.poly_edge = pPicture -> polyEdge;
mask |= CPPolyEdge; mask |= CPPolyEdge;
attributes.poly_mode = pPicture -> polyMode; attributes.poly_mode = pPicture -> polyMode;
mask |= CPPolyMode; mask |= CPPolyMode;
attributes.dither = pPicture -> dither; attributes.dither = pPicture -> dither;
mask |= CPDither; mask |= CPDither;
attributes.component_alpha = pPicture -> componentAlpha; attributes.component_alpha = pPicture -> componentAlpha;
mask |= CPComponentAlpha; mask |= CPComponentAlpha;
pForm = NULL; XRenderPictFormat *pForm = NULL;
if (pPicture -> pFormat) if (pPicture -> pFormat)
{ {
...@@ -2827,14 +2758,13 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2) ...@@ -2827,14 +2758,13 @@ void nxagentReconnectPicture(void * p0, XID x1, void *p2)
Bool nxagentReconnectAllPicture(void *p) Bool nxagentReconnectAllPicture(void *p)
{ {
int i; Bool r = True;
Bool r;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentReconnectAllPicture: Going to recreate all pictures.\n"); fprintf(stderr, "nxagentReconnectAllPicture: Going to recreate all pictures.\n");
#endif #endif
for (i = 0, r = True; i < MAXCLIENTS; i++) for (int i = 0; i < MAXCLIENTS; i++)
{ {
if (clients[i]) if (clients[i])
{ {
...@@ -2883,14 +2813,13 @@ void nxagentDisconnectPicture(void * p0, XID x1, void* p2) ...@@ -2883,14 +2813,13 @@ void nxagentDisconnectPicture(void * p0, XID x1, void* p2)
Bool nxagentDisconnectAllPicture(void) Bool nxagentDisconnectAllPicture(void)
{ {
int i; Bool r = True;
Bool r;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentDisconnectAllPicture.\n"); fprintf(stderr, "nxagentDisconnectAllPicture.\n");
#endif #endif
for (i = 0, r = True; i < MAXCLIENTS; i++) for (int i = 0; i < MAXCLIENTS; i++)
{ {
if (clients[i]) if (clients[i])
{ {
...@@ -2913,8 +2842,6 @@ Bool nxagentDisconnectAllPicture(void) ...@@ -2913,8 +2842,6 @@ Bool nxagentDisconnectAllPicture(void)
void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color) void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color)
{ {
Picture id;
if (nxagentRenderEnable == False) if (nxagentRenderEnable == False)
{ {
return; return;
...@@ -2939,7 +2866,7 @@ void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color) ...@@ -2939,7 +2866,7 @@ void nxagentRenderCreateSolidFill(PicturePtr pPicture, xRenderColor *color)
memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0, memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
sizeof(XRenderPictureAttributes_)); sizeof(XRenderPictureAttributes_));
id = XRenderCreateSolidFill(nxagentDisplay, (XRenderColor *) color); Picture id = XRenderCreateSolidFill(nxagentDisplay, (XRenderColor *) color);
#ifdef DEBUG #ifdef DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
...@@ -2957,10 +2884,6 @@ void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1, ...@@ -2957,10 +2884,6 @@ void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1,
xFixed *stops, xFixed *stops,
xRenderColor *colors) xRenderColor *colors)
{ {
Picture id;
XLinearGradient linearGradient;
if (nxagentRenderEnable == False) if (nxagentRenderEnable == False)
{ {
return; return;
...@@ -3000,14 +2923,16 @@ void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1, ...@@ -3000,14 +2923,16 @@ void nxagentRenderCreateLinearGradient(PicturePtr pPicture, xPointFixed *p1,
memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0, memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
sizeof(XRenderPictureAttributes_)); sizeof(XRenderPictureAttributes_));
XLinearGradient linearGradient;
linearGradient.p1.x = (XFixed) p1 -> x; linearGradient.p1.x = (XFixed) p1 -> x;
linearGradient.p1.y = (XFixed) p1 -> y; linearGradient.p1.y = (XFixed) p1 -> y;
linearGradient.p2.x = (XFixed) p2 -> x; linearGradient.p2.x = (XFixed) p2 -> x;
linearGradient.p2.y = (XFixed) p2 -> y; linearGradient.p2.y = (XFixed) p2 -> y;
id = XRenderCreateLinearGradient(nxagentDisplay, &linearGradient, Picture id = XRenderCreateLinearGradient(nxagentDisplay, &linearGradient,
(XFixed *) stops, (XFixed *) stops,
(XRenderColor *) colors, nStops); (XRenderColor *) colors, nStops);
#ifdef DEBUG #ifdef DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
...@@ -3028,17 +2953,12 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner, ...@@ -3028,17 +2953,12 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner,
xFixed *stops, xFixed *stops,
xRenderColor *colors) xRenderColor *colors)
{ {
Picture id;
XRadialGradient radialGradient;
if (nxagentRenderEnable == False) if (nxagentRenderEnable == False)
{ {
return; return;
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentRenderCreateRadialGradient: Got called.\n"); fprintf(stderr, "nxagentRenderCreateRadialGradient: Got called.\n");
if (pPicture == NULL) if (pPicture == NULL)
...@@ -3065,12 +2985,13 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner, ...@@ -3065,12 +2985,13 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner,
{ {
fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! colors pointer is NULL.\n"); fprintf(stderr, "nxagentRenderCreateRadialGradient: WARNING! colors pointer is NULL.\n");
} }
#endif /* #ifdef DEBUG */ #endif /* #ifdef DEBUG */
memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0, memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
sizeof(XRenderPictureAttributes_)); sizeof(XRenderPictureAttributes_));
XRadialGradient radialGradient;
radialGradient.inner.x = (XFixed) inner -> x; radialGradient.inner.x = (XFixed) inner -> x;
radialGradient.inner.y = (XFixed) inner -> y; radialGradient.inner.y = (XFixed) inner -> y;
radialGradient.inner.radius = (XFixed) innerRadius; radialGradient.inner.radius = (XFixed) innerRadius;
...@@ -3078,7 +2999,7 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner, ...@@ -3078,7 +2999,7 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner,
radialGradient.outer.y = (XFixed) outer -> y; radialGradient.outer.y = (XFixed) outer -> y;
radialGradient.outer.radius = (XFixed) outerRadius; radialGradient.outer.radius = (XFixed) outerRadius;
id = XRenderCreateRadialGradient(nxagentDisplay, &radialGradient, Picture id = XRenderCreateRadialGradient(nxagentDisplay, &radialGradient,
(XFixed *) stops, (XFixed *) stops,
(XRenderColor *) colors, nStops); (XRenderColor *) colors, nStops);
...@@ -3099,17 +3020,12 @@ void nxagentRenderCreateConicalGradient(PicturePtr pPicture, ...@@ -3099,17 +3020,12 @@ void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
xFixed *stops, xFixed *stops,
xRenderColor *colors) xRenderColor *colors)
{ {
Picture id;
XConicalGradient conicalGradient;
if (nxagentRenderEnable == False) if (nxagentRenderEnable == False)
{ {
return; return;
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentRenderCreateConicalGradient: Got called.\n"); fprintf(stderr, "nxagentRenderCreateConicalGradient: Got called.\n");
if (pPicture == NULL) if (pPicture == NULL)
...@@ -3131,19 +3047,20 @@ void nxagentRenderCreateConicalGradient(PicturePtr pPicture, ...@@ -3131,19 +3047,20 @@ void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
{ {
fprintf(stderr, "nxagentRenderCreateConicalGradient: WARNING! colors pointer is NULL.\n"); fprintf(stderr, "nxagentRenderCreateConicalGradient: WARNING! colors pointer is NULL.\n");
} }
#endif /* #ifdef DEBUG */ #endif /* #ifdef DEBUG */
memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0, memset(&(nxagentPicturePriv(pPicture) -> lastServerValues), 0,
sizeof(XRenderPictureAttributes_)); sizeof(XRenderPictureAttributes_));
XConicalGradient conicalGradient;
conicalGradient.center.x = (XFixed) center -> x; conicalGradient.center.x = (XFixed) center -> x;
conicalGradient.center.y = (XFixed) center -> y; conicalGradient.center.y = (XFixed) center -> y;
conicalGradient.angle = (XFixed) angle; conicalGradient.angle = (XFixed) angle;
id = XRenderCreateConicalGradient(nxagentDisplay, &conicalGradient, Picture id = XRenderCreateConicalGradient(nxagentDisplay, &conicalGradient,
(XFixed *) stops, (XFixed *) stops,
(XRenderColor *) colors, nStops); (XRenderColor *) colors, nStops);
#ifdef DEBUG #ifdef DEBUG
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment