1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// `draw_text_fontdue` and the tiny-skia path take several
// independent geometry / color arguments; bundling them into a
// struct would obscure the call sites without simplifying any.
//! CPU rendering backend for truce plugins (tiny-skia + fontdue).
//!
//! Parallels [`truce-gpu`](../truce_gpu/) at the same level of the
//! crate graph: both implement [`truce_gui_types::RenderBackend`] on
//! their respective primitives ([`CpuBackend`] uses tiny-skia
//! software rasterization; `truce_gpu::WgpuBackend` uses wgpu). The
//! built-in editor (`truce_gui::BuiltinEditor`) holds an internal
//! `CpuBackend` for its iOS / pre-blit rendering path; `GpuEditor`
//! routes through `WgpuBackend` for non-iOS.
//!
//! Plugin authors don't usually depend on this crate directly -
//! `truce-gui::default_editor` pulls it in. Custom-editor plugins
//! (egui / iced / slint) that want a software `RenderBackend` for
//! testing without a GPU can opt in here.
pub use CpuBackend;
/// Extension trait giving [`truce_gui_types::theme::Color`] the
/// `to_skia` / `to_premultiplied` methods. Lives here (next to the
/// tiny-skia rasterizer that consumes them) so `truce-gui-types`
/// stays rasterizer-free.