feat(gx): add static conversion tables to CGxFormat

This commit is contained in:
fallenoak committed 2025-11-16 20:30:39 -06:00
1 parent 940205d934
commit 2596911617
2 files changed
+27

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include "gx/CGxFormat.hpp"
const char* CGxFormat::formatToBitsString[] = {
"16", // Fmt_Rgb565
"24", // Fmt_ArgbX888
"24", // Fmt_Argb8888
"30", // Fmt_Argb2101010
"16", // Fmt_Ds160
"24", // Fmt_Ds24X
"24", // Fmt_Ds248
"32", // Fmt_Ds320
};
int32_t CGxFormat::formatToBitsUint[] = {
16, // Fmt_Rgb565
24, // Fmt_ArgbX888
24, // Fmt_Argb8888
30, // Fmt_Argb2101010
16, // Fmt_Ds160
24, // Fmt_Ds24X
24, // Fmt_Ds248
32, // Fmt_Ds320
};
+4
View File
@@ -19,6 +19,10 @@ class CGxFormat {
Formats_Last = 8
};
// Static variables
static int32_t formatToBitsUint[Formats_Last];
static const char* formatToBitsString[Formats_Last];
// Member variables
bool hwTnL;
int8_t window;