mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibGfx: Make DistinctFourCC compatible with BigEndian
This commit is contained in:
parent
0245614a4f
commit
046c79b468
1 changed files with 8 additions and 2 deletions
|
@ -26,13 +26,19 @@ enum class FourCCType {
|
||||||
};
|
};
|
||||||
|
|
||||||
template<FourCCType type>
|
template<FourCCType type>
|
||||||
struct DistinctFourCC {
|
struct [[gnu::packed]] DistinctFourCC {
|
||||||
u32 value { 0 };
|
explicit DistinctFourCC(u32 value)
|
||||||
|
: value(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
explicit operator u32() const { return value; }
|
||||||
|
|
||||||
char c0() const { return value >> 24; }
|
char c0() const { return value >> 24; }
|
||||||
char c1() const { return (value >> 16) & 0xff; }
|
char c1() const { return (value >> 16) & 0xff; }
|
||||||
char c2() const { return (value >> 8) & 0xff; }
|
char c2() const { return (value >> 8) & 0xff; }
|
||||||
char c3() const { return value & 0xff; }
|
char c3() const { return value & 0xff; }
|
||||||
|
|
||||||
|
u32 value { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
using PreferredCMMType = DistinctFourCC<FourCCType::PreferredCMMType>; // ICC v4, "7.2.3 Preferred CMM type field"
|
using PreferredCMMType = DistinctFourCC<FourCCType::PreferredCMMType>; // ICC v4, "7.2.3 Preferred CMM type field"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue