Simon Hausmann
26ff1f6a79
Cleanup: simplify internal render() signature by removing adapter argument
...
We can unwrap internally.
2022-12-08 12:12:11 +01:00
Simon Hausmann
18bf24e7bf
cleanup: simplify access to the winit window
...
We can now return a reference.
2022-12-06 14:15:56 +01:00
Simon Hausmann
8dd28d232e
Port to new major glutin version
2022-12-06 14:15:56 +01:00
Simon Hausmann
39121994ca
Always set Window.default-font-size
...
Permit the style metrics to provide a `default-font-size` and bind that
to the `Window` if set. If not provided, then the backend can set a
`default-font-size`. By ensuring that the value is non-zero at run-time,
we can later introduce a rem unit that can act as factor relative to
this non-zero font size.
2022-11-03 17:15:44 +01:00
Tobias Hunger
639dcaf702
api: Rename module swrenderer
to software_renderer
...
Also rename the `swrenderer` feature to `software-renderer`.
2022-09-07 10:11:11 +02:00
Olivier Goffart
3f1324cc61
Allow to run the software backend without the femtovg backend
2022-09-02 16:38:35 +02:00
Olivier Goffart
e0f1fdf298
Rgb565Pixel: remove color accessor, add conversion to Rgb8Pixel
...
Closes #1540
(Went or Rgb8Pixel instead of color, because color can have alpha)
2022-09-01 13:58:38 +02:00
Simon Hausmann
9338d31535
Remove the use of euclid types from the software renderer public API
...
Closes #1538
2022-08-31 09:23:38 +02:00
Tobias Hunger
38350db9a0
Fixes pointed out by Olivier and CI
2022-08-29 16:53:47 +02:00
Tobias Hunger
107e3ed2e2
janitor: Fix some typos
2022-08-29 16:53:47 +02:00
Tobias Hunger
1e6ffeaa0f
API cleanup: Rename PlatformWindow to WindowAdapter
2022-08-29 16:53:47 +02:00
Olivier Goffart
344f5c437b
swrenderer: Move the DirtyTracking enum into a const generic
...
Closes: 1541
2022-08-29 14:13:55 +02:00
Olivier Goffart
1eaa4e1517
winit with swrenderer: don't call window.draw_contents
twice.
...
The render function of the swrendrer already call that.
2022-08-29 11:42:10 +02:00
Olivier Goffart
4f0e2608d2
Sofware renderer: keep a Weak of the Window
...
Closes #1545
Not that `SoftwareRenderer::new()` takes the Weak by value instead of
by reference, because coercing a reference to a `Weak` to a `&Weak<dyn>`
is not possible, while converting a Weak to a `Weak<dyn>` just works.
2022-08-29 11:07:05 +02:00
Olivier Goffart
f271ebbf21
Add an env variable to test the line by line renderer
...
This also test the 16 bit mode on the desktop
2022-08-27 15:05:06 +02:00
Simon Hausmann
a116f58b0c
Decouple our femtovg dependency from glutin
...
This will allow updating glutin without femtovg
2022-08-25 16:49:59 +02:00
Olivier Goffart
a27806aca8
Add a feature to use the sofware renderer with the winit backend
...
Currently, you still need to pass some env variable at build time so it
embeds the font.
2022-08-22 19:02:28 +02:00