perf(draw) reimplement circle drawing algorithms (#2374)

* perf(draw) reimplement circle drawing algorithms

Imporve the speed of circle drawing
Add circle draw caching
Various other speed improvements

* docs describe how to use masks

* fix(draw) add missing GC root usage
This commit is contained in:
Gabor Kiss-Vamosi
2021-07-27 19:16:00 +02:00
committed by GitHub
parent e23701e2c2
commit 637b706ddc
25 changed files with 517 additions and 323 deletions

View File

@@ -39,6 +39,8 @@ static void draw_event_cb(lv_event_t * e)
lv_draw_rect(&a, dsc->clip_area, &draw_rect_dsc);
/*Remove the masks*/
lv_draw_mask_free_param(&line_mask_param);
lv_draw_mask_free_param(&fade_mask_param);
lv_draw_mask_remove_id(line_mask_id);
lv_draw_mask_remove_id(fade_mask_id);
}

View File

@@ -43,6 +43,8 @@ static void mask_event_cb(lv_event_t * e)
lv_draw_mask_fade_param_t * fade_mask_bottom = lv_draw_mask_remove_id(mask_bottom_id);
lv_mem_buf_release(fade_mask_top);
lv_mem_buf_release(fade_mask_bottom);
lv_draw_mask_free_param(&fade_mask_top);
lv_draw_mask_free_param(&fade_mask_bottom);
mask_top_id = -1;
mask_bottom_id = -1;
}