Commit graph

14 commits

Author SHA1 Message Date
Olivier Goffart
27f1e099ae MCU: compile with just the std feature to test the Dummy backend on desktop 2022-02-18 11:52:54 +01:00
Simon Hausmann
a5ed38b43f Make the position of the SceneItem a PhysicalPoint
... instead of two x/y physical lengths.
2022-02-18 10:39:24 +01:00
Simon Hausmann
df49ef1c78 Make the size of SceneItem a PhysicalSize
... instead of two separate physical lengths
2022-02-18 10:39:16 +01:00
Simon Hausmann
dae68ae9d3 Use a PhysicalSize for the SceneTexture's source dimensions
... instead of two separate lengths.
2022-02-18 10:39:07 +01:00
Simon Hausmann
02dcf1173b Simplify conversion from physical to logical pixels in the mcu backend
It turns out that after casting to the f32 variant we can divide the by scale factor instead of multiplying
with the inverse.
2022-02-17 15:07:57 +01:00
Simon Hausmann
f912ec7e6b Fix scaling of glyphs and improve type safety in the MCU backend
The code was mixing logical and physical sizes, causing glyphs being
doubly scaled down. Instead, this patch introduces:

 * Physical* and Logical* euclid length/size/rect aliases
 * some extraction traits for getting the scalars in rects/sizes as lengths (until euclid has them
built-in)
 * wrapper traits/types for safely extracting the physical font metrics the
 compiler generates (i16)
 * Fix a bug in the text height calculation where we failed to take the
   descent into account
2022-02-17 15:07:57 +01:00
Simon Hausmann
bd2a62b0c2 Reduce memory consumption of scene items further
Move the specific data out of SceneItem into separate vectors. This makes the process of
sorting/moving scene items faster (less memory to move) and makes rectangle rich scenes
consume less memory.

This also paves the way for a "SimpleSceneTexture" vs. a more complex texture.
2022-02-15 15:52:24 +01:00
Simon Hausmann
e98375cfb9 Reduce memory consumption when sorting scene items
Instead of sort_by - which allocates a len / 2 buffer - use sort_unstable_by for
in-place sorting.
2022-02-15 15:52:24 +01:00
Simon Hausmann
ba9705010e Fix mismatch between logical and physical pixel sizes
The embedded glyphs use physical pixel sizes while the incoming font requests uses logical pixels.
2022-02-15 15:52:24 +01:00
Simon Hausmann
4424b0ecb5 Start stubbing out primitive glyph rendering in the mcu backend
This is still relatively heavy in terms of memory consumption, we
generate a scene item per glyph.
2022-02-15 15:52:24 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
The README.md contains the warning that used to be in lib.rs.

Add README.md files to all internal crates

... pointing to the official public crate to use instead.

Rename internal crates

fixup: README files

fixup rename
2022-02-07 13:12:48 +01:00
Simon Hausmann
ad0c020aa4 Rename the sixtyfps-corelib crate 2022-02-01 18:04:30 +01:00
Tobias Hunger
a3b86690ff [reorg]: Move the rendering backends into internal 2022-01-31 16:00:50 +01:00
Renamed from sixtyfps_runtime/rendering_backends/mcu/renderer.rs (Browse further)