1 #include <stdbool.h>
2 #include <inttypes.h>
3 
4 #include <epoxy/egl.h>
5 
6 typedef struct gfxstate gfxstate;
7 
8 struct gfxstate {
9     /* info */
10     uint32_t hdisplay;
11     uint32_t vdisplay;
12     uint32_t stride;
13     uint8_t  *mem;
14     uint8_t  *mem2;
15 
16     uint32_t bits_per_pixel;
17     uint32_t rlen, glen, blen, tlen;
18     uint32_t roff, goff, boff, toff;
19 
20     /* egl */
21     EGLDisplay dpy;
22     EGLContext ctx;
23     EGLSurface surface;
24 
25     /* calls */
26     void (*restore_display)(void);
27     void (*cleanup_display)(void);
28     void (*flush_display)(bool second);
29 };
30