mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-04-13 07:37:10 +00:00
#452: better endian fix for SurfaceFormat (M1209812/M986328)
This commit is contained in:
parent
dfaeb3f24a
commit
78dd4ea8ff
@ -152,10 +152,8 @@ GfxFormatToCairoFormat(SurfaceFormat format)
|
||||
switch (format)
|
||||
{
|
||||
case SurfaceFormat::A8R8G8B8_UINT32:
|
||||
case SurfaceFormat::B8G8R8A8: // XXX?
|
||||
return CAIRO_FORMAT_ARGB32;
|
||||
case SurfaceFormat::X8R8G8B8_UINT32:
|
||||
case SurfaceFormat::B8G8R8X8: // XXX?
|
||||
return CAIRO_FORMAT_RGB24;
|
||||
case SurfaceFormat::A8:
|
||||
return CAIRO_FORMAT_A8;
|
||||
|
@ -61,10 +61,10 @@ enum class SurfaceFormat : int8_t {
|
||||
// The following values are endian-independent synonyms. The _UINT32 suffix
|
||||
// indicates that the name reflects the layout when viewed as a uint32_t
|
||||
// value.
|
||||
#if MOZ_LITTLE_ENDIAN
|
||||
#if MOZ_BIG_ENDIAN
|
||||
A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
|
||||
X8R8G8B8_UINT32 = B8G8R8X8 // 0x00RRGGBB
|
||||
#elif MOZ_BIG_ENDIAN
|
||||
#elif MOZ_LITTLE_ENDIAN
|
||||
A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
|
||||
X8R8G8B8_UINT32 = X8R8G8B8 // 0x00RRGGBB
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user