mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
render/egl: replace init/finish with create/destroy
This ensures wlr_gles2_renderer can properly take ownership of the wlr_egl. Closes: https://github.com/swaywm/wlroots/issues/2612
This commit is contained in:
parent
50b120927d
commit
1d461687d2
12 changed files with 62 additions and 68 deletions
|
|
@ -78,21 +78,20 @@ struct wlr_egl {
|
|||
struct wlr_drm_format_set dmabuf_render_formats;
|
||||
};
|
||||
|
||||
// TODO: Allocate and return a wlr_egl
|
||||
/**
|
||||
* Initializes an EGL context for the given platform and remote display.
|
||||
* Will attempt to load all possibly required api functions.
|
||||
*
|
||||
* If config_attribs is NULL, the EGL config is not created.
|
||||
*/
|
||||
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
|
||||
struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display,
|
||||
const EGLint *config_attribs);
|
||||
|
||||
/**
|
||||
* Frees all related EGL resources, makes the context not-current and
|
||||
* unbinds a bound wayland display.
|
||||
*/
|
||||
void wlr_egl_finish(struct wlr_egl *egl);
|
||||
void wlr_egl_destroy(struct wlr_egl *egl);
|
||||
|
||||
/**
|
||||
* Binds the given display to the EGL instance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue