xwayland/glamor: Remove the xwl_egl_backend structure
No more backend structure, one GBM backend to rule them all! Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
This commit is contained in:
parent
8c0267b60f
commit
888e3e7a94
|
@ -49,74 +49,6 @@ typedef enum _xwl_glamor_mode_flags{
|
||||||
XWL_GLAMOR_DEFAULT = XWL_GLAMOR_GL | XWL_GLAMOR_GLES,
|
XWL_GLAMOR_DEFAULT = XWL_GLAMOR_GL | XWL_GLAMOR_GLES,
|
||||||
} xwl_glamor_mode_flags;
|
} xwl_glamor_mode_flags;
|
||||||
|
|
||||||
struct xwl_egl_backend {
|
|
||||||
/* Set by the backend if available */
|
|
||||||
Bool is_available;
|
|
||||||
|
|
||||||
/* Features and requirements set by the backend */
|
|
||||||
xwl_egl_backend_flags backend_flags;
|
|
||||||
|
|
||||||
/* Called once for each interface in the global registry. Backends
|
|
||||||
* should use this to bind to any wayland interfaces they need.
|
|
||||||
*/
|
|
||||||
Bool (*init_wl_registry)(struct xwl_screen *xwl_screen,
|
|
||||||
struct wl_registry *wl_registry,
|
|
||||||
uint32_t id, const char *name,
|
|
||||||
uint32_t version);
|
|
||||||
|
|
||||||
/* Check that the required Wayland interfaces are available.
|
|
||||||
*/
|
|
||||||
Bool (*has_wl_interfaces)(struct xwl_screen *xwl_screen);
|
|
||||||
|
|
||||||
/* Called before glamor has been initialized. Backends should setup a
|
|
||||||
* valid, glamor compatible EGL context in this hook.
|
|
||||||
*/
|
|
||||||
Bool (*init_egl)(struct xwl_screen *xwl_screen);
|
|
||||||
|
|
||||||
/* Called after glamor has been initialized, and after all of the
|
|
||||||
* common Xwayland DDX hooks have been connected. Backends should use
|
|
||||||
* this to setup any required wraps around X server callbacks like
|
|
||||||
* CreatePixmap.
|
|
||||||
*/
|
|
||||||
Bool (*init_screen)(struct xwl_screen *xwl_screen);
|
|
||||||
|
|
||||||
/* Called by Xwayland to retrieve a pointer to a valid wl_buffer for
|
|
||||||
* the given window/pixmap combo so that damage to the pixmap may be
|
|
||||||
* displayed on-screen. Backends should use this to create a new
|
|
||||||
* wl_buffer for a currently buffer-less pixmap, or simply return the
|
|
||||||
* pixmap they've prepared beforehand.
|
|
||||||
*/
|
|
||||||
struct wl_buffer *(*get_wl_buffer_for_pixmap)(PixmapPtr pixmap);
|
|
||||||
|
|
||||||
/* Called by Xwayland to perform any pre-wl_surface damage routines
|
|
||||||
* that are required by the backend. If your backend is poorly
|
|
||||||
* designed and lacks the ability to render directly to a surface,
|
|
||||||
* you should implement blitting from the glamor pixmap to the wayland
|
|
||||||
* pixmap here. Otherwise, this callback is optional.
|
|
||||||
*/
|
|
||||||
Bool (*post_damage)(struct xwl_window *xwl_window,
|
|
||||||
PixmapPtr pixmap, RegionPtr region);
|
|
||||||
|
|
||||||
/* Called by Xwayland to confirm with the egl backend that the given
|
|
||||||
* pixmap is completely setup and ready for display on-screen. This
|
|
||||||
* callback is optional.
|
|
||||||
*/
|
|
||||||
Bool (*allow_commits)(struct xwl_window *xwl_window);
|
|
||||||
|
|
||||||
/* Called by Xwayland to check whether the given pixmap can be
|
|
||||||
* presented by xwl_present_flip. If not implemented, assumed TRUE.
|
|
||||||
*/
|
|
||||||
Bool (*check_flip)(PixmapPtr pixmap);
|
|
||||||
|
|
||||||
/* Called to get the DRM device of the primary GPU that this backend
|
|
||||||
* is set up on.
|
|
||||||
*/
|
|
||||||
drmDevice *(*get_main_device)(struct xwl_screen *xwl_screen);
|
|
||||||
|
|
||||||
/* Direct hook to create the backing pixmap for a window */
|
|
||||||
PixmapPtr (*create_pixmap_for_window)(struct xwl_window *xwl_window);
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef XWL_HAS_GLAMOR
|
#ifdef XWL_HAS_GLAMOR
|
||||||
|
|
||||||
Bool xwl_glamor_init(struct xwl_screen *xwl_screen);
|
Bool xwl_glamor_init(struct xwl_screen *xwl_screen);
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
struct xwl_pixmap;
|
struct xwl_pixmap;
|
||||||
struct xwl_window;
|
struct xwl_window;
|
||||||
struct xwl_screen;
|
struct xwl_screen;
|
||||||
struct xwl_egl_backend;
|
|
||||||
struct xwl_drm_lease;
|
struct xwl_drm_lease;
|
||||||
struct xwl_output;
|
struct xwl_output;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue