ft-font: Use compile-time test (WORDS_BIGENDIAN) rather than run-time function to test endian-ness.

This commit is contained in:
Carl Worth 2006-06-20 11:28:23 -07:00
parent b806b50cfe
commit 2f43a79e4e

View file

@ -698,14 +698,6 @@ static const int filters[3][3] = {
{ 65538*1/13,65538*3/13,65538*9/13 },
};
static cairo_bool_t
_native_byte_order_lsb (void)
{
int x = 1;
return *((char *) &x) == 1;
}
/* Fills in val->image with an image surface created from @bitmap
*/
static cairo_status_t
@ -751,7 +743,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
}
}
if (_native_byte_order_lsb())
#ifndef WORDS_BIGENDIAN
{
unsigned char *d = data;
int count = stride * height;
@ -761,6 +753,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
*d++;
}
}
#endif
format = CAIRO_FORMAT_A1;
break;