Age | Commit message (Collapse) | Author |
|
|
|
|
|
The headless backend no longer needs a parent renderer: it no longer
needs to return it in wlr_backend_impl.get_renderer, nor does it
need to return its DRM FD in wlr_backend_impl.get_drm_fd. Drop this
function altogether since it now behaves exactly like
wlr_headless_backend_create.
|
|
Sometimes the headless backend is used standalone with the Pixman
renderer, sometimes it's used together with another backend which
has already picked a DRM FD. In both of these cases it doesn't make
sense to pick a DRM FD.
Broadly speaking the headless backend doesn't really care which DRM
device is used for the buffers it receives. So it doesn't really
make sense to tie it to a particular DRM device.
Let the backend users (e.g. wlr_renderer_autocreate) open an arbitrary
DRM FD as needed instead.
|
|
This field's ownership is unclear: it's in wlr_input_device, but
it's not managed by the common code, it's up to each individual
backend to use it and clean it up.
Since this is a backend implementation detail, move it to the
backend-specific structs.
|
|
|
|
Instead of ensuring the renderer and allocator are initialized in each
backend, do it in wlr_backend_autocreate. This allows compositors to
create backends without any renderer/allocator if they side-step
wlr_backend_autocreate.
Since the wlr_backend_get_renderer and backend_get_allocator end up
calling wlr_renderer_autocreate and wlr_allocator_autocreate, it sounds
like a good idea to centralize all of the opimionated bits in one place.
|
|
Add render/allocator/ and include/render/allocator/ to hold
everything allocator-related.
|
|
Custom backends and renderers need to implement
wlr_backend_impl.get_buffer_caps and
wlr_renderer_impl.get_render_buffer_caps. They can't if enum
wlr_buffer_cap isn't made public.
|
|
Rely on wlr_output's generic swapchain support instead of creating our
own. The headless output now simply keeps a reference to the front buffer
and does nothing else.
|
|
Instead of managing our own renderer and allocator, let the common
code do it.
Because wlr_headless_backend_create_with_renderer needs to re-use
the parent renderer, we have to hand-roll some of the renderer
initialization.
|
|
This new functions cleans up the common backend state. While this
currently only emits the destroy signal, this will also clean up
the renderer and allocator in upcoming patches.
|
|
We were not dup'ing the DRM FD coming from wlr_renderer_get_drm_fd,
resulting in a double-close on backend destroy.
|
|
|
|
|
|
|
|
|
|
|
|
We were calling wlr_renderer_autocreate before wlr_backend_init,
which caused a NULL dereference on wlr_backend.impl.
|
|
|
|
|
|
|
|
|
|
|
|
This isn't used anymore by any backend.
Some examples still provide an EGL config to wlr_egl_init, so we can't
drop it yet there.
|
|
This callback allowed compositors to customize the EGL config used by
the renderer. However with renderer v6 EGL configs aren't used anymore.
Instead, buffers are allocated via GBM and GL FBOs are rendered to. So
customizing the EGL config is a no-op.
|
|
Backends will eventually stop creating their renderer. To prepare for
this, stop using EGL_PLATFORM_SURFACELESS_MESA in the headless renderer.
Pick a render node using libdrm.
The new allocator/renderer creation logic looks very much like what will
end up in common code.
|
|
This makes sure the CLOEXEC flag is set on the dup'ed FD.
|
|
|
|
When allocating buffers, use a format suitable for rendering. This
avoids picking a format that won't work.
|
|
|
|
When the headless backend uses an already-existing renderer, it doesn't
have ownership over the renderer. When the renderer is destroyed, the
headless backend needs to destroy itself.
|
|
This allows one to create a headless backend with an existing renderer.
|
|
|
|
Ensure these are set to the correct value.
|
|
Users can just pass EGL_DEFAULT_DISPLAY themselves.
|
|
Remove glapi.sh code generation, replace it with hand-written loading
code that checks extension strings before calling eglGetProcAddress.
The GLES2 renderer still uses global state because of:
- {PUSH,POP}_GLES2_DEBUG macros
- wlr_gles2_texture_from_* taking a wlr_egl instead of the renderer
|
|
This should be set to EGL_OPENGL_ES2_BIT.
Also fixes EGL config attributes in the headless and X11 backends.
|
|
|
|
|
|
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.
Fixes #987
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|