1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:17:36 +00:00

LibGfx: Move FourCC to its own file

These are used in fonts too, so let's not limit them to ImageLoader.
This commit is contained in:
Sam Atkins 2023-11-20 17:06:45 +00:00 committed by Andreas Kling
parent 9f2ee86e4d
commit 2c24192e1f
4 changed files with 28 additions and 15 deletions

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace Gfx {
struct FourCC {
constexpr FourCC(char const* name)
{
cc[0] = name[0];
cc[1] = name[1];
cc[2] = name[2];
cc[3] = name[3];
}
bool operator==(FourCC const&) const = default;
bool operator!=(FourCC const&) const = default;
char cc[4];
};
}