feat(draw): add initial SDL renderer
It caches SW rendered bitmaps in textures. The cache is also updated to support data and source separately. E.g. source is a path to an image, and if that image changes all related cache entries needs to found and invalidated. Limitations of SDL rederer: - not all draw task types are supported - image transformation is not supported - some textures (e.g. button matrix texts) are not detected as cached - images are not cached - images are supported only from path
This commit is contained in:
@@ -225,7 +225,7 @@ static void draw_vector(lv_layer_t * layer)
|
||||
|
||||
void lv_demo_vector_graphic(void)
|
||||
{
|
||||
static uint8_t canvas_buf[WIDTH * HEIGHT * 4];
|
||||
static uint8_t canvas_buf[LV_CANVAS_BUF_SIZE(WIDTH, HEIGHT, 32, LV_DRAW_BUF_STRIDE_ALIGN)];
|
||||
|
||||
lv_obj_t * canvas = lv_canvas_create(lv_scr_act());
|
||||
lv_canvas_set_buffer(canvas, canvas_buf, WIDTH, HEIGHT, LV_COLOR_FORMAT_ARGB8888);
|
||||
|
||||
Reference in New Issue
Block a user