Commit graph

39 commits

Author SHA1 Message Date
Olivier Goffart
711fa66ca3 rp2040 backend: use DMA to send pixels to the screen via SPI 2022-06-17 09:30:09 +02:00
Lukas Jung
45406ddef0
Make the Pico use Interrupts and WFE (#1337) 2022-06-15 17:15:58 +02:00
Simon Hausmann
2d2eb70b51 Fix panic about multiple mutable borrows with the software renderer
When using repeaters - like in the slide puzzle - and during renderer a component
gets deleted, we call free_graphics_resources and try to free
the dirty rectangle list in the partial renderer cache. At that point the cache is
already mutably borrowed, which causes a panic.

As remedy, apply the mutable borrow more fine grained and not right when calling
render().
2022-06-10 08:38:34 +02:00
Olivier Goffart
a72115518d Move the software renderer to core 2022-06-04 13:40:50 +02:00
Olivier Goffart
6cbf2c0609 Put the new cache in corelib and use it in the GL backend 2022-05-31 10:48:24 +02:00
Olivier Goffart
80830bbece MCU: Refactor the renderer in a LineRenderer
The LineRenderer is going to be a public type which can be used
by the MCU board support to draw.
Right now, it is used by the old code
2022-05-23 16:40:34 +02:00
Olivier Goffart
fc65809b9d stm32h735: cleanup after review 2022-04-27 09:00:52 +02:00
Olivier Goffart
e41c15aef9 stm32h735g: Add support for double frame buffer and timing 2022-04-27 09:00:52 +02:00
Olivier Goffart
0e0526912d WIP: attempt to get the display working on stm32h735g
(doesn't work, the screen is plain white)
2022-04-27 09:00:52 +02:00
Olivier Goffart
703cffd444 WIP: STM32H735G support 2022-04-27 09:00:52 +02:00
Olivier Goffart
1b91158b46 corelib: allow to use i32 for coordinate instead of f32 2022-04-11 17:46:50 +02:00
Simon Hausmann
afb59cba29 mcu: fix popups not visibly closing
When closing a popup, notify the platform window, so that the mcu
backend can remember that region and start the dirty region with it.

Also, free all the rendering cache items of deleted items, to avoid accidental re-use
when re-opening a popup.
2022-04-08 19:32:33 +02:00
Simon Hausmann
db54da2064 mcu: Don't panic when opening popups
Implement popups as inline components. The dirty region handling however
is still missing when closing a popup.
2022-04-08 16:46:12 +02:00
Lukas Jung
b6171530ab replace text_input_position_for_byte_offset with text_input_cursor_rect_for_byte_offset 2022-03-28 10:07:07 +02:00
Olivier Goffart
eb9092ba15 MCU: run the timers 2022-03-18 18:51:29 +01:00
Olivier Goffart
8cae8b9602 MCU: Make the debug show more lines 2022-03-16 13:04:42 +01:00
Olivier Goffart
608211b0d6 MCU: Allow to use RGB565 for the draw buffer 2022-03-14 15:52:09 +01:00
Olivier Goffart
9259413ec2 MCU cleanup
- Attempt to unify a bit the features so we have less #[cfg] in the demo
 - Add a README
2022-03-09 20:49:46 +01:00
Olivier Goffart
b2caa757e7 Partial renderer: Initial work 2022-03-03 14:58:48 +01:00
Simon Hausmann
f1dae75d53 Fix interpreter ffi build
Commit 738ac0dc01 increased the size of the ImageInner::StaticTextures variant,
which breaks the size assertions in the interpreter ffi build.

This changes fixes that by reducing the size of the ImageInner variant again by
moving all the fields into a separate struct.
2022-03-03 14:04:45 +01:00
Simon Hausmann
0316af5343 Add support for profiling in the mcu renderer (#968)
Profile different stages behind a slint_debug_performance cfg and feed the result into debug_log!

Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2022-03-03 13:34:47 +01:00
Simon Hausmann
738ac0dc01 mcu: scale images at compile time (#966)
Apply a scale factor to reduce the size of embedded images at compile
time.
2022-03-03 13:28:47 +01:00
n-raine
beda5aca07 Add dark style detection support for GL backend
With the help of dark-light crate this is now exposed as dark-style
boolean property in NativeStyleMetrics.

Co-authored-by: Olivier Goffart <olivier@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-03-01 16:41:20 +01:00
Olivier Goffart
48a1b668b6 MCU: mark the scale_factor as a constant property 2022-02-21 20:11:59 +01:00
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
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
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
Simon Hausmann
7e30bb5f93 Fix two build warnings in the mcu backend 2022-02-08 10:18:01 +01:00
Olivier Goffart
1425ef63de Change the Url from sixtyfps.io to slint-ui.com
Also, change the URL of the logo in the docs
2022-02-08 08:52:46 +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
125b90a64b Merge remote-tracking branch 'origin/master' into wip/rename
Conflicts:
	api/cpp/cbindgen.rs
	api/cpp/include/slint.h
	examples/CMakeLists.txt
	examples/imagefilter/Cargo.toml
	examples/plotter/main.rs
	internal/backends/mcu/lib.rs
2022-02-04 16:47:20 +01:00
Simon Hausmann
8959eac3d0 Add rendering callbacks to sixtyfps::Window
This API allows specifying a callback that will be invoked when setting
up graphics (great for compiling shaders), before rendering a frame (but
after the clearning of the surface background), after rendering a frame
(before swapbuffers) and when releasing graphics resources.
2022-02-04 15:41:53 +01:00
Tobias Hunger
2b55c488ca
Rename sixtyfps to slint in internal 2022-02-02 16:16:55 +01:00
Tobias Hunger
1a0a495bc5
Rename environment variables 2022-02-02 13:35:07 +01:00
Simon Hausmann
ad0c020aa4 Rename the sixtyfps-corelib crate 2022-02-01 18:04:30 +01:00
Simon Hausmann
e5bf6e01df janitor: Fix MCU backend build
Follow-up to commit f31f4201c6
2022-02-01 16:30:24 +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/lib.rs (Browse further)