Commit graph

38 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
33581182ef backend-selector: Add the ability to configure WGPU
The `require_wgpu_24` function accepts either a fully setup WGPU, or one
can configure individual aspects such as features/limits.

The wgpu_texture example uses this to add push constants to the required
features and thus eliminates the need for uniform buffers.
2025-04-29 17:46:57 +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
102d83a306 Skia: Don't render with software by default on macOS/Windows
On macOS we should default to the Meta renderer, similar `renderer-skia` defaults to D3D on Windows. Unfortunately commit 0d36f88152 broke this by forgetting
that None with the requested graphics API means: Go for with what we have, nothing special requested.

This also fixes the terminal output "Failed to initialize Skia GPU renderer: Requested non-Metal rendering with Metal renderer . Falling back to software rendering" (and similar on Windows).
2024-12-20 10:48:55 +01:00
Simon Hausmann
0d36f88152 Revamp BackendSelector API
Based on API review, PlatformBuilder becomes BackendSelector with
a slightly smaller API surface but more options, such as selecting
Metal or Vulkan rendering.
2024-12-16 13:06:05 +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
388b504683 Update Skia to 0.78
This updates Skia to Milestone 129. See
https://github.com/rust-skia/rust-skia/releases/tag/0.78.0 for
additional details.
2024-09-11 08:25:24 +02:00
Simon Hausmann
1c54cce021 Skia: Fix windows build 2024-06-18 17:48:17 +02:00
Simon Hausmann
4c888bf1ae Port the Skia renderer to rwh06 and the new softbuffer
... by accepting an Rc<dyn Has*Handle> in the interface. This is required for softbuffer use.
2024-06-18 17:48:17 +02: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
e616ac376a Update skia-safe
This brings in Skia Milestone 123 and fixes the use of directwrite on Windows. For more details, see https://github.com/rust-skia/rust-skia/releases/tag/0.72.0
2024-03-21 13:14:35 +01:00
Simon Hausmann
e4c087c5b0 Update Skia Rust Bindings
See https://github.com/rust-skia/rust-skia/releases/tag/0.70.0 for a list of changes.

The main change for us is that the D3D API was ported to the modern windows rust crate.

(cherry picked from commit f809b3ff41)

The previous attempt at merging this surfaced build issue for source
builds with Skia, due to the use of an old git version that doesn't
understand the new --path-format=relative option the git-sync-deps.py
script uses with git rev-parse, as well as the new permission checking
that breaks with docker volumes where ~/.cargo is mapped to /cargo and
the skia-bindings build performs additional git clones in there, where the
resulting user ids will differ.

Work around the former by upgrading git, and the latter by adding a
wildcard - sadly there's no recursive sub-directory option.

This new version also removes ureq from the dependency tree, which means
we can revert commit 212e28071c
2024-01-31 15:18:54 +01:00
Simon Hausmann
a46b70833a Revert "Update Skia Rust Bindings"
This reverts commit f809b3ff41.

Unfortunately this broke the cross build :(
2024-01-20 09:11:11 +01:00
Simon Hausmann
f809b3ff41 Update Skia Rust Bindings
See https://github.com/rust-skia/rust-skia/releases/tag/0.70.0 for a list of changes.

The main change for us is that the D3D API was ported to the modern windows rust crate.
2024-01-19 16:59:22 +01:00
Simon Hausmann
f5bf6e5dc0 Skia: Clean up pre present notify callback API
Move this back out of render() again and make it stateful in the renderer. Reduces the amount of book-keeping required and it's always the same callback anyway.
2024-01-04 10:35:09 +01:00
Simon Hausmann
3069e8e503 Add support for frame throttling on Wayland
Use winit's pre_present_notify() API to allow for the compositor to throttle rendering.

Fixes #4200
cc #1695
2024-01-04 09:21:53 +01:00
Simon Hausmann
bdd275811e Bump skia-safe version
This updates to m118. See
https://github.com/rust-skia/rust-skia/releases/tag/0.67.0 for more
details.
2023-10-26 10:45:36 +02:00
Simon Hausmann
0aa4c42989 skia: Add support for Skia's software renderer 2023-10-23 13:55:23 +02:00
Tobias Hunger
b12575a4c4 janitor: Go over our spell checking setup
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
2023-10-16 09:01:51 +02:00
Simon Hausmann
779e216b2a Update to skia-safe 0.66.1 (skia 116/117)
This new version compiles with LLVM 16 that's now in the GH action
runner windows images.

cc #3365
2023-09-13 10:11:39 +02:00
Simon Hausmann
b503733d03 Update to a new release of the Rust Skia bindings 2023-07-31 16:18:42 +02:00
Simon Hausmann
a71e73b549 Make the surfaces part of the Skia renderer API 2023-07-28 13:40:37 +02:00
Simon Hausmann
49fe2b1bb4 Skia: Make the surface type a dyn
This will allow falling back to different surfaces/renderers.
2023-07-28 13:40:37 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Simon Hausmann
fb1d37286f Clean up the Skia renderer API
Accept display and window handles with life time, instead of &dyn
HasRaw*Handle.
2023-06-07 12:20:57 +02:00
Simon Hausmann
a09b2c9188 janitor: Fix clippy warning
Don't call drop a on reference.

Fixes #2725
2023-05-12 16:49:23 +02:00
Simon Hausmann
fcfa1da5bc D3D: Replace panics with propagated platform errors
This isn't quite perfect either, but arguably an improvement and
consistent with the error handling elsewhere.
2023-05-11 12:38:54 +02:00
Simon Hausmann
013ce69a65
Remove stray newline 2023-05-11 06:46:02 +02:00
Simon Hausmann
71cbd5eadd
Fix formatting 2023-05-11 06:33:17 +02:00
Simon Hausmann
5d641a17f6 Skia: Fix panic in d3d renderer when UAC is shown
Presenting on the swapchain fails with a harmless error in that case.

Fixes #2707
2023-05-10 20:17:37 +02:00
Simon Hausmann
8ffb5131c7
Introduce error handling in the FemtoVG and Skia renderers (#2402)
Avoid unwrap() and expect() and instead propagate errors all the way
down to run_event_loop(), show(), and hide() in the Slint AIP.
2023-03-24 14:18:11 +01:00
Simon Hausmann
01d2efce4e Move the Skia renderer into a separate crate
The crate is an internal crate until the API has been polished and
documented, after which we can call slint-renderer-skia for example.

This also duplicates a little bit of the glutin setup code, because
that would otherwise have to go into another shared crate.
2022-12-09 17:04:54 +01:00
Renamed from internal/backends/winit/renderer/skia/d3d_surface.rs (Browse further)