bernii / embedded-graphics-framebuf

Generic framebuffer implementation in Rust for use with embedded-graphics library
MIT License
26 stars 6 forks source link

Provide a backend implementation for heap storage #22

Open svenstaro opened 6 months ago

svenstaro commented 6 months ago

The current implementations for backend storage accept only stack-allocated arrays, either as a reference or moved. I think it would be neat as some embedded hardware supports this though with a warning that this might not be supported everywhere.

My problem is that my buffers are 320x240x16b and so I need around 160kB per buffer (and I have two of them) which is quite the squeeze in stack memory.

jounathaen commented 6 months ago

I think https://github.com/bernii/embedded-graphics-framebuf/pull/23 fixes this by allowing slices as backend.