With the drm output now waiting for the page flip on render *and* gbm and dumb buffer displays supporting triple buffering,
we don't need the entire async page flip handling logic anymore.
In the future we could turn wait_for_page_flip() into an async fn.
Combining an EGL config with EGL_ALPHA_SIZE == 8 with an Xrgb8888 surface yields a bad match on eglCreateWindowSurface.
That's fair, and we should accomodate for that by avoiding such EGL configs.
This assumes the same xrgb888 interface that the drm dumb buffer uses, too. Missing, beyond different pixel depths is:
- mode setting (requires fbset on the command line right now)
- vsync (not sure if possible)
- line padding
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
gbm.rs' lock_front_buffer calls has_free_buffers before calling the underling C lock_front_buffer function on the gbm surface. This has_free_buffers() check succeeds the first time but always fails after that.
However apart from this check, everything else appears to be working perfectly fine. Projects like weston, ksmcube, Qt, or mutter don't do this check beforehand either, so this patch works around gbm.rs by skipping this.
Unfortunately this requires going to gbm-sys directly and implementing the drm traits that require calling the various gbm_bo_get_* functions to retrieve the buffer details for posting to DRM.
This is the initial implementation based on DRM dumb buffers,
which cleans up various things at the same time:
- DRM output is separate from GBM and DRM dumb buffer displays.
The latter two re-use the former.
- The timer refresh for the Vulkan KHR Display rendering lives
now with the KHR display code, in hope to be replaced with a
better mechanism in the future.
What's missing still is support for partial updates as well as
rendering with our own software renderer.
Remove the hack of calling present() from our swap_buffers() forwarder (and let it really only forward),
and instead call it explicitly through the shared egl_display member.
The way we can pass along the callback instead of storing it separately.
We don't need to wait 16ms, we could render right away. In theory this could also use invoke_from_event_loop, but then
the callback needs to be sync, which is an unnecessary
complication.
That's less boiler plate for us and better error handling (note how the receive_events()
call on the DRM device now propagates the error). And this also unregisters automatically
on drop.
... instead pass the fd into the calloop event loop and change state when we receive activity on it.
This improves performance slightly, and is a necessary to be able to implement refresh rate throttled rendering (in the next commits).
This might fix the issue with resizing causing swapchain re-creation
errors, because "Swapchain creation no longer returns an error when the
swapchain extent doesn't match the current surface extent."
cc #3850
This reverts commit 17afe1aa8a.
This causes
thread '<unnamed>' panicked at 'assertion failed: (has_modifier && modifier.is_some()) || (!has_modifier && modifier.is_none())', drm-0.10.0/src/control/mod.rs:324:9
when running on qemu-virgl.
Adding a framebuffer with the given modifiers fails for some reason. Forcing
the gbm surface to linear is one workaround, but instead
let's use the old API without modifiers but still planar support.
This also removes the dependency to drm-ffi again, which was missing from renderer-femtovg.