From 1db976cecb6968b2d989840c6f16aa00bb83d026 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 24 Jun 2021 13:11:21 +0200 Subject: render/egl: replace wlr_egl_create with wlr_egl_create_with_drm_fd We never create an EGL context with the platform set to something other than EGL_PLATFORM_GBM_KHR. Let's simplify wlr_egl_create by taking a DRM FD instead of a (platform, remote_display) tuple. This hides the internal details of creating an EGL context for a specific device. This will allow us to transparently use the device platform [1] when the time comes. [1]: https://github.com/swaywm/wlroots/pull/2671 --- include/render/egl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/render/egl.h') diff --git a/include/render/egl.h b/include/render/egl.h index 7d593f69..191293bf 100644 --- a/include/render/egl.h +++ b/include/render/egl.h @@ -11,10 +11,11 @@ struct wlr_egl_context { }; /** - * Initializes an EGL context for the given platform and remote display. - * Will attempt to load all possibly required api functions. + * Initializes an EGL context for the given DRM FD. + * + * Will attempt to load all possibly required API functions. */ -struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display); +struct wlr_egl *wlr_egl_create_with_drm_fd(int drm_fd); /** * Frees all related EGL resources, makes the context not-current and -- cgit v1.2.3