Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support heap allocation in FrameBuffer #746

Open
nishanthkarthik opened this issue Feb 25, 2024 · 0 comments
Open

Support heap allocation in FrameBuffer #746

nishanthkarthik opened this issue Feb 25, 2024 · 0 comments

Comments

@nishanthkarthik
Copy link

  • Version of embedded-graphics in use (if applicable): 0.8.1

Description of the problem/feature request/other

FrameBuffer embeds a large array data: [u8; N]. Box::new(FrameBuffer::new()) still constructs the frame buffer on the stack before moving it to a box. Ideally I should be able to provide my own backing buffer on the heap.

As a workaround, I can use alloc with the correct layout and use a Box::from_raw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant