From 930713cf44bcae9a91f92a1582f329643d38abfd Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Sun, 3 Feb 2019 13:08:57 +0100 Subject: add gfxfmt, fixes --- gfx.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gfx.h') diff --git a/gfx.h b/gfx.h index 608a128..840d0df 100644 --- a/gfx.h +++ b/gfx.h @@ -1,8 +1,33 @@ #include #include +#include +#include + +/* ---------------------------------------------------------------------- */ + +#undef MAX +#define MAX(x,y) ((x)>(y)?(x):(y)) +#undef MIN +#define MIN(x,y) ((x)<(y)?(x):(y)) +#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) + +/* ---------------------------------------------------------------------- */ + +typedef struct gfxfmt gfxfmt; typedef struct gfxstate gfxstate; +struct gfxfmt { + uint32_t fourcc; /* little endian (drm) */ + cairo_format_t cairo; /* native endian */ + pixman_format_code_t pixman; /* native endian */ + uint32_t bits_pp; + uint32_t bytes_pp; +}; + +extern gfxfmt fmt_list[]; +extern uint32_t fmt_count; + struct gfxstate { /* info */ uint32_t hdisplay; -- cgit