diff options
author | Simon Ser <contact@emersion.fr> | 2022-03-31 11:29:24 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-05-25 18:17:41 +0000 |
commit | f954092f22256c807c70f2a7de376f29e864d342 (patch) | |
tree | 7caa77f1cfdef8cf136173c3adff8436e9a7fe3d /include/render | |
parent | 452a8ec9401fabc054872fdbd5096c4a87fcea8a (diff) |
render/egl: make wlr_egl struct opaque
Compositors can use wlr_egl_create_with_context if they need a
custom EGL display or context.
Diffstat (limited to 'include/render')
-rw-r--r-- | include/render/egl.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/render/egl.h b/include/render/egl.h index 55e9ce80..547254c8 100644 --- a/include/render/egl.h +++ b/include/render/egl.h @@ -3,6 +3,47 @@ #include <wlr/render/egl.h> +struct wlr_egl { + EGLDisplay display; + EGLContext context; + EGLDeviceEXT device; // may be EGL_NO_DEVICE_EXT + struct gbm_device *gbm_device; + + struct { + // Display extensions + bool KHR_image_base; + bool EXT_image_dma_buf_import; + bool EXT_image_dma_buf_import_modifiers; + bool IMG_context_priority; + + // Device extensions + bool EXT_device_drm; + bool EXT_device_drm_render_node; + + // Client extensions + bool EXT_device_query; + bool KHR_platform_gbm; + bool EXT_platform_device; + } exts; + + struct { + PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT; + PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; + PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; + PFNEGLQUERYWAYLANDBUFFERWL eglQueryWaylandBufferWL; + PFNEGLQUERYDMABUFFORMATSEXTPROC eglQueryDmaBufFormatsEXT; + PFNEGLQUERYDMABUFMODIFIERSEXTPROC eglQueryDmaBufModifiersEXT; + PFNEGLDEBUGMESSAGECONTROLKHRPROC eglDebugMessageControlKHR; + PFNEGLQUERYDISPLAYATTRIBEXTPROC eglQueryDisplayAttribEXT; + PFNEGLQUERYDEVICESTRINGEXTPROC eglQueryDeviceStringEXT; + PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT; + } procs; + + bool has_modifiers; + struct wlr_drm_format_set dmabuf_texture_formats; + struct wlr_drm_format_set dmabuf_render_formats; +}; + struct wlr_egl_context { EGLDisplay display; EGLContext context; |