Commit f3aca240 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Image.c: code simplification/scope

parent 203891d1
...@@ -140,9 +140,7 @@ static char *nxagentImageCopy(XImage *source, XImage *destination); ...@@ -140,9 +140,7 @@ static char *nxagentImageCopy(XImage *source, XImage *destination);
* expensive than a copy. * expensive than a copy.
*/ */
#define nxagentNeedCache(image, method) \ #define nxagentNeedCache(image, method) ((method) != PACK_BITMAP_16M_COLORS)
\
((method) != PACK_BITMAP_16M_COLORS)
/* /*
* With the bitmap encoding, if the image is 32 bits-per-pixel the 4th * With the bitmap encoding, if the image is 32 bits-per-pixel the 4th
...@@ -276,6 +274,7 @@ int nxagentImagePad(int width, int format, int leftPad, int depth) ...@@ -276,6 +274,7 @@ int nxagentImagePad(int width, int format, int leftPad, int depth)
else if (format == XYPixmap) else if (format == XYPixmap)
{ {
line = BitmapBytePad(width + leftPad); line = BitmapBytePad(width + leftPad);
/* FIXME: shouldn't we multiply by depth here like in nxagentImageLength? */
} }
else if (format == ZPixmap) else if (format == ZPixmap)
{ {
...@@ -1559,7 +1558,6 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, ...@@ -1559,7 +1558,6 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio,
XImage **pImage, int *scaledx, int *scaledy) XImage **pImage, int *scaledx, int *scaledy)
{ {
XImage *image = *pImage; XImage *image = *pImage;
if (image == NULL) if (image == NULL)
{ {
return 0; return 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