target/arm: Implement security attribute lookups for memory accesses
[qemu/kevin.git] / include / ui / egl-helpers.h
blob81cb255de08f750c03f4b145b5743d0d9807083a
1 #ifndef EGL_HELPERS_H
2 #define EGL_HELPERS_H
4 #include <epoxy/gl.h>
5 #include <epoxy/egl.h>
6 #include <gbm.h>
8 extern EGLDisplay *qemu_egl_display;
9 extern EGLConfig qemu_egl_config;
11 typedef struct egl_fb {
12 int width;
13 int height;
14 GLuint texture;
15 GLuint framebuffer;
16 bool delete_texture;
17 } egl_fb;
19 void egl_fb_destroy(egl_fb *fb);
20 void egl_fb_setup_default(egl_fb *fb, int width, int height);
21 void egl_fb_setup_for_tex(egl_fb *fb, int width, int height,
22 GLuint texture, bool delete);
23 void egl_fb_setup_new_tex(egl_fb *fb, int width, int height);
24 void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip);
25 void egl_fb_read(void *dst, egl_fb *src);
27 #ifdef CONFIG_OPENGL_DMABUF
29 extern int qemu_egl_rn_fd;
30 extern struct gbm_device *qemu_egl_rn_gbm_dev;
31 extern EGLContext qemu_egl_rn_ctx;
33 int egl_rendernode_init(const char *rendernode);
34 int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc);
36 #endif
38 EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
40 int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy);
41 int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy);
42 EGLContext qemu_egl_init_ctx(void);
44 #endif /* EGL_HELPERS_H */