feat(draw): add layer memory allocation config support (#7038)

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: liamHowatt <liamjmh0@gmail.com>
Co-authored-by: Liam <30486941+liamHowatt@users.noreply.github.com>
This commit is contained in:
Attila Kiss
2024-12-16 08:51:01 +01:00
committed by GitHub
parent c022f0896a
commit a7adce9d1a
5 changed files with 48 additions and 6 deletions

View File

@@ -144,6 +144,12 @@
/** The target buffer size for simple layer chunks. */
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /**< [bytes]*/
/* Limit the max allocated memory for simple and transformed layers.
* It should be at least `LV_DRAW_LAYER_SIMPLE_BUF_SIZE` sized but if transformed layers are also used
* it should be enough to store the largest widget too (width x height x 4 area).
* Set it to 0 to have no limit. */
#define LV_DRAW_LAYER_MAX_MEMORY 0 /**< No limit by default [bytes]*/
/** Stack size of drawing thread.
* NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more.
*/