Commit graph

28 commits

Author SHA1 Message Date
Simon Hausmann
302926edfa
Skia: Improve multi-window rendering resource consumption (#8304)
Share Vulkan instance as well as Metal device and command queue across windows.
2025-04-29 18:58:09 +02:00
Simon Hausmann
6595aee73c
Replace use of Rc<winit:🪟:Window> with Arc (#8257)
In preparation for wgpu usage, where the wgpu API requires the window
handle to be send, i.e. Arc<dyn HasWindowHandle>.
2025-04-24 13:28:51 +02:00
Simon Hausmann
31912fedaf LinusKMS: Clean up and simplify presenter interface
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.
2025-01-08 21:46:25 +01:00
Simon Hausmann
82c72d4d26 LinuxKMS: Enable triple-buffering when rendering with gbm
cc #6951
2025-01-08 21:46:25 +01:00
Simon Hausmann
3f8084cdc0 When using Skia with softbuffer and partial rendering, report damages to softbuffer
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-19 21:31:04 +01:00
Simon Hausmann
9b7de3f806 Pass the buffer age to the Skia software renderer 2024-11-19 21:31:04 +01:00
Ian Hattendorf
ac9b85049a Add PlatformBuilder API to allow selecting OpenGL API
Right now this just allows selecting between OpenGL and OpenGL ES.
2024-10-23 11:13:49 +02:00
Simon Hausmann
9bef3e47f4 Fix GBM rendering on mali EGL drivers
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.
2024-07-30 13:04:48 +02:00
Simon Hausmann
877bf786b8 Add support for RGB565 linux framebuffer rendering 2024-07-08 11:55:57 +02:00
Simon Hausmann
011a3e8a47 linuxkms: Hide the drm dumb buffer software display implementation behind a trait
... to make room for a linuxfb fallback implementation
2024-06-22 09:37:34 +02:00
Simon Hausmann
760e04a411 Fix build
- Upgrade linuxkms backend to rwh06
- Adapt vulkan_surface to internal Skia surface trait changes made in earlier commit
2024-06-18 17:48:17 +02:00
Simon Hausmann
028903c2d3 LinuxKMS: Add support for partial rendering with the Slint software renderer 2024-06-10 06:01:19 -07:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
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"
2024-04-15 15:18:55 +02:00
Simon Hausmann
982b4c806f LinuxKMS: Add initial support for software rendering with Skia
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.
2024-01-07 11:54:29 +01:00
Simon Hausmann
6b6fd91035 linuxkms: Move the fallback timer based animation driver code into a separate helper type 2023-12-19 16:59:35 +01:00
Simon Hausmann
0ccc334de7 linuxkms: remove home-grown fd event source with calloop's generic even source
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.
2023-12-19 16:59:35 +01:00
Simon Hausmann
208a1e24ac linuxkms: replace 16m timer for animations with page flip driven rendering (if possible) 2023-12-19 16:59:35 +01:00
Simon Hausmann
4f0ad4c15b linuxkms: remove page flip specific bits from the calloop event loop
This belongs encapsulated inside the egldisplay code.
2023-12-19 16:59:35 +01:00
Simon Hausmann
b40b629e11 linuxkms: don't blockingly read on the drm fd after issuing a page flip request
... 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).
2023-12-19 16:59:35 +01:00
Simon Hausmann
3b51c8e30a
LinuxKMS: Add support for synthetic display rotations (#4166)
This patch adds support for the `SLINT_KMS_ROTATION` environment
variable, that instructs the Skia/FemtoVG renderers to rotate
the scene before rendering.
2023-12-18 17:49:05 +01:00
Simon Hausmann
60901a27ff skia: Fall back to software rendering if GPU accelerate rendering fails to initialize
At the moment this is only supported for the winit backend and the C++
API. linuxkms uses a different SkiaRenderer constructor.
2023-10-23 13:55:23 +02:00
Simon Hausmann
23ca0cb36c Disambiguate Render trait type name
Use FullscreenRenderer as name for the trait used in the linuxkms backend
2023-07-31 17:11:43 +02:00
Simon Hausmann
6b044ae078 Rename extension trait to use Ext as suffix 2023-07-31 13:06:28 +02:00
Simon Hausmann
84ddfc6c2f Add support for rendering the mouse cursor with linuxkms
The cursor is loaded by the window adapter from the cache. When it's
loaded the first time, its format will be Svg, so we convert it to a
pixel buffer. That way the skia backend can convert it on first draw
into a skia_safe::Image and replace the cache entry with the backend
storage variant.
2023-07-31 13:06:28 +02:00
Simon Hausmann
fee44f3f7d Add basic support for libseat
This is not dynamic unfortunately, but at least it forwards device access for OpenGL and remove the need to run it as root.
2023-07-28 13:40:37 +02:00
Simon Hausmann
e40f6c253e linuxkms: Add support for FemtoVG as renderer 2023-07-28 13:40:37 +02:00