-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Separate the rendering and widgets #6447
Comments
Hi, By rendering you mean e.g. software rendering which actually draws a rectangles, text, etc, or even an upper layer which creates What would be use case for this separation? Who will do the rendering in the end? |
This can be useful in cases where WASM is used (notably with WAMR on embedded devices) where the client application is sandboxed, preventing direct access to host memory. A naive approach would be to have a buffer per client application (each instance running its own LVGL "rendering engine"), but this is not very memory-efficient. A better approach would be to compile LVGL as a WASM module without the rendering part (which is likely the heaviest part). The client application would then load this WASM LVGL module, create and set the necessary properties on its objects/widgets, and send references to the parent objects to the host containing the "rendering engine". These references would be attached by the host to one of the screens and then rendered. Minimizing the size of the WASM part is crucial since the entire code is compiled when building it as a WASM module (similar to a shared library). |
I see now but I'm not sure if it will work. Or have you already tried mixing the widget created by multiple LVGL instances? My concern is that (I assume) each instance will create the widgets in its own memory pool. However it can happen that an other LVGL instance will delete/free the widgets. In this case cc @liamHowatt |
Introduce the problem
It would be good to be able to get rid of the rendering part when needed (with a
#define
inlv_conf.h
), somewhat like having a "client" side and a "server" side.Proposal
The client side would only be responsible for setting up and configuring the data structure structures, and the server side for the rendering and input device. Currently, LVGL compiled in WASM occupies ~600 KB, which is significant. I think we can reduce this by getting rid of the rendering part.
The text was updated successfully, but these errors were encountered: