qcow: Switch to .bdrv_co_block_status()
[qemu/ar7.git] / include / ui / egl-helpers.h
blob747233ce5846360948ea3329e6080e4acc40b0ca
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 void egl_texture_blit(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip);
28 void egl_texture_blend(QemuGLShader *gls, egl_fb *dst, egl_fb *src, bool flip,
29 int x, int y);
31 #ifdef CONFIG_OPENGL_DMABUF
33 extern int qemu_egl_rn_fd;
34 extern struct gbm_device *qemu_egl_rn_gbm_dev;
35 extern EGLContext qemu_egl_rn_ctx;
37 int egl_rendernode_init(const char *rendernode);
38 int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc);
40 void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf);
41 void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf);
43 #endif
45 EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
47 int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy);
48 int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy);
49 EGLContext qemu_egl_init_ctx(void);
51 #endif /* EGL_HELPERS_H */