fix(vg_lite): remove redundant MOVE_TO operations (#5713)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech
2024-02-24 21:02:03 +08:00
committed by GitHub
parent b34d3f07ce
commit f5ca15b321
2 changed files with 2 additions and 4 deletions

View File

@@ -114,6 +114,8 @@ void lv_draw_vg_lite_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * d
float end_x = radius_in * MATH_COSF(end_angle_rad) + cx;
float end_y = radius_in * MATH_SINF(end_angle_rad) + cy;
lv_vg_lite_path_move_to(path, start_x, start_y);
/* radius_out arc */
lv_vg_lite_path_append_arc(path,
cx, cy,
@@ -134,7 +136,6 @@ void lv_draw_vg_lite_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * d
false);
/* close arc */
lv_vg_lite_path_line_to(path, start_x, start_y);
lv_vg_lite_path_close(path);
/* draw round */

View File

@@ -445,9 +445,6 @@ void lv_vg_lite_path_append_arc(lv_vg_lite_path_t * path,
lv_vg_lite_path_move_to(path, cx, cy);
lv_vg_lite_path_line_to(path, start_x + cx, start_y + cy);
}
else {
lv_vg_lite_path_move_to(path, start_x + cx, start_y + cy);
}
for(int i = 0; i < n_curves; ++i) {
float end_angle = start_angle + ((i != n_curves - 1) ? MATH_HALF_PI * sweep_sign : fract);