Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The backend destroy signal is emitted before the output_remove
signal is. When the destroy signal is emitted listeners remove
their output_remove listener, so the output_remove signal is never
received and listeners have an invalid output pointer.
The correct way to solve this would be to remove the output_remove
signal completely and use the wlr_output.events.destroy signal
instead. This isn't yet possible because wl_signal_emit is unsafe
and listeners cannot be removed in listeners.
|
|
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
|
|
|
|
|
|
|
|
|