mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-17 03:40:28 +01:00
ft-font: Use compile-time test (WORDS_BIGENDIAN) rather than run-time function to test endian-ness.
This commit is contained in:
parent
b806b50cfe
commit
2f43a79e4e
1 changed files with 2 additions and 9 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue