9 #include "ui/console.h"
10 #include "ui/shader.h"
12 extern EGLDisplay
*qemu_egl_display
;
13 extern EGLConfig qemu_egl_config
;
14 extern DisplayGLMode qemu_egl_mode
;
16 typedef struct egl_fb
{
24 void egl_fb_destroy(egl_fb
*fb
);
25 void egl_fb_setup_default(egl_fb
*fb
, int width
, int height
);
26 void egl_fb_setup_for_tex(egl_fb
*fb
, int width
, int height
,
27 GLuint texture
, bool delete);
28 void egl_fb_setup_new_tex(egl_fb
*fb
, int width
, int height
);
29 void egl_fb_blit(egl_fb
*dst
, egl_fb
*src
, bool flip
);
30 void egl_fb_read(DisplaySurface
*dst
, egl_fb
*src
);
32 void egl_texture_blit(QemuGLShader
*gls
, egl_fb
*dst
, egl_fb
*src
, bool flip
);
33 void egl_texture_blend(QemuGLShader
*gls
, egl_fb
*dst
, egl_fb
*src
, bool flip
,
34 int x
, int y
, double scale_x
, double scale_y
);
38 extern int qemu_egl_rn_fd
;
39 extern struct gbm_device
*qemu_egl_rn_gbm_dev
;
40 extern EGLContext qemu_egl_rn_ctx
;
42 int egl_rendernode_init(const char *rendernode
, DisplayGLMode mode
);
43 int egl_get_fd_for_texture(uint32_t tex_id
, EGLint
*stride
, EGLint
*fourcc
,
44 EGLuint64KHR
*modifier
);
46 void egl_dmabuf_import_texture(QemuDmaBuf
*dmabuf
);
47 void egl_dmabuf_release_texture(QemuDmaBuf
*dmabuf
);
51 EGLSurface
qemu_egl_init_surface_x11(EGLContext ectx
, EGLNativeWindowType win
);
53 #if defined(CONFIG_X11) || defined(CONFIG_GBM)
55 int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy
, DisplayGLMode mode
);
56 int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy
, DisplayGLMode mode
);
60 EGLContext
qemu_egl_init_ctx(void);
61 bool qemu_egl_has_dmabuf(void);
63 #endif /* EGL_HELPERS_H */