diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-03 13:08:57 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-03 13:08:57 +0100 |
commit | 930713cf44bcae9a91f92a1582f329643d38abfd (patch) | |
tree | a02b43454a26174c905ef1e2035685eb7b6428e1 /gfx.h | |
parent | 4ff884bd2510326dafb5adb97e69797d006b0e14 (diff) | |
download | fbida-930713cf44bcae9a91f92a1582f329643d38abfd.tar.gz |
add gfxfmt, fixes
Diffstat (limited to 'gfx.h')
-rw-r--r-- | gfx.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1,8 +1,33 @@ #include <stdbool.h> #include <inttypes.h> +#include <pixman.h> +#include <cairo.h> + +/* ---------------------------------------------------------------------- */ + +#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; |