chore: fix code formatting

This commit is contained in:
Gabor Kiss-Vamosi
2023-12-12 11:51:07 +01:00
parent 710e134abf
commit 88ada04ebd
12 changed files with 0 additions and 40 deletions

View File

@@ -65,7 +65,6 @@ lv_ll_t _ll_Dave2D_Tasks;
lv_mutex_t xd2Semaphore; lv_mutex_t xd2Semaphore;
#endif #endif
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/
@@ -427,8 +426,6 @@ static int32_t lv_draw_dave2d_dispatch(lv_draw_unit_t * draw_unit, lv_layer_t *
return 1; return 1;
} }
#if LV_USE_OS #if LV_USE_OS
static void _dave2d_render_thread_cb(void * ptr) static void _dave2d_render_thread_cb(void * ptr)
{ {
@@ -585,8 +582,6 @@ static d2_s32 lv_dave2d_init(void)
return result; return result;
} }
void dave2d_execute_dlist_and_flush(void) void dave2d_execute_dlist_and_flush(void)
{ {
#if LV_USE_OS #if LV_USE_OS

View File

@@ -39,7 +39,6 @@ typedef struct {
#endif #endif
} lv_draw_dave2d_unit_t; } lv_draw_dave2d_unit_t;
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/

View File

@@ -63,7 +63,6 @@ void lv_draw_dave2d_arc(lv_draw_dave2d_unit_t * u, const lv_draw_arc_dsc_t * dsc
d2_setcolor(u->d2_handle, 0, lv_draw_dave2d_lv_colour_to_d2_colour(dsc->color)); d2_setcolor(u->d2_handle, 0, lv_draw_dave2d_lv_colour_to_d2_colour(dsc->color));
result = d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2, result = d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2,
(d2_border)clipped_area.y2); (d2_border)clipped_area.y2);
if(D2_OK != result) { if(D2_OK != result) {
@@ -110,7 +109,6 @@ void lv_draw_dave2d_arc(lv_draw_dave2d_unit_t * u, const lv_draw_arc_dsc_t * dsc
__BKPT(0); __BKPT(0);
} }
if(dsc->rounded) { if(dsc->rounded) {
lv_point_t start_coord; lv_point_t start_coord;
lv_point_t end_coord; lv_point_t end_coord;
@@ -118,7 +116,6 @@ void lv_draw_dave2d_arc(lv_draw_dave2d_unit_t * u, const lv_draw_arc_dsc_t * dsc
start_coord.x = arc_centre.x + (int16_t)(((dsc->radius - dsc->width / 2) * cos_start) >> LV_TRIGO_SHIFT); start_coord.x = arc_centre.x + (int16_t)(((dsc->radius - dsc->width / 2) * cos_start) >> LV_TRIGO_SHIFT);
start_coord.y = arc_centre.y + (int16_t)(((dsc->radius - dsc->width / 2) * sin_start) >> LV_TRIGO_SHIFT); start_coord.y = arc_centre.y + (int16_t)(((dsc->radius - dsc->width / 2) * sin_start) >> LV_TRIGO_SHIFT);
/** Render a circle. */ /** Render a circle. */
d2_rendercircle(u->d2_handle, d2_rendercircle(u->d2_handle,
(d2_point) D2_FIX4((uint16_t)(start_coord.x)), (d2_point) D2_FIX4((uint16_t)(start_coord.x)),

View File

@@ -56,7 +56,6 @@ static void dave2d_draw_border_simple(lv_draw_dave2d_unit_t * u, const lv_area_t
int32_t y; int32_t y;
bool is_common; bool is_common;
is_common = _lv_area_intersect(&clip_area, outer_area, u->base_unit.clip_area); is_common = _lv_area_intersect(&clip_area, outer_area, u->base_unit.clip_area);
if(!is_common) return; if(!is_common) return;
@@ -80,7 +79,6 @@ static void dave2d_draw_border_simple(lv_draw_dave2d_unit_t * u, const lv_area_t
lv_area_move(&local_outer_area, x, y); lv_area_move(&local_outer_area, x, y);
lv_area_move(&local_inner_area, x, y); lv_area_move(&local_inner_area, x, y);
#if D2_RENDER_EACH_OPERATION #if D2_RENDER_EACH_OPERATION
d2_selectrenderbuffer(u->d2_handle, u->renderbuffer); d2_selectrenderbuffer(u->d2_handle, u->renderbuffer);
#endif #endif
@@ -264,7 +262,6 @@ static void dave2d_draw_border_complex(lv_draw_dave2d_unit_t * u, const lv_area_
(d2_point)D2_FIX4(lv_area_get_height(&blend_area))); (d2_point)D2_FIX4(lv_area_get_height(&blend_area)));
} }
if(left_side) { if(left_side) {
blend_area.x1 = outer_area.x1; blend_area.x1 = outer_area.x1;
blend_area.x2 = inner_area.x1 - 1; blend_area.x2 = inner_area.x1 - 1;
@@ -289,7 +286,6 @@ static void dave2d_draw_border_complex(lv_draw_dave2d_unit_t * u, const lv_area_
(d2_point)D2_FIX4(lv_area_get_height(&blend_area))); (d2_point)D2_FIX4(lv_area_get_height(&blend_area)));
} }
/*Draw the corners*/ /*Draw the corners*/
int32_t blend_w; int32_t blend_w;
/*Left corners*/ /*Left corners*/

View File

@@ -1,7 +1,6 @@
#include "lv_draw_dave2d.h" #include "lv_draw_dave2d.h"
#if LV_USE_DRAW_DAVE2D #if LV_USE_DRAW_DAVE2D
void lv_draw_dave2d_fill(lv_draw_dave2d_unit_t * u, const lv_draw_fill_dsc_t * dsc, const lv_area_t * coords) void lv_draw_dave2d_fill(lv_draw_dave2d_unit_t * u, const lv_draw_fill_dsc_t * dsc, const lv_area_t * coords)
{ {
lv_area_t draw_area; lv_area_t draw_area;
@@ -51,7 +50,6 @@ void lv_draw_dave2d_fill(lv_draw_dave2d_unit_t * u, const lv_draw_fill_dsc_t * d
(d2_u32)lv_area_get_height(&buffer_area), (d2_u32)lv_area_get_height(&buffer_area),
lv_draw_dave2d_cf_fb_get()); lv_draw_dave2d_cf_fb_get());
if(LV_GRAD_DIR_NONE != dsc->grad.dir) { if(LV_GRAD_DIR_NONE != dsc->grad.dir) {
float a1; float a1;
float a2; float a2;
@@ -137,7 +135,6 @@ void lv_draw_dave2d_fill(lv_draw_dave2d_unit_t * u, const lv_draw_fill_dsc_t * d
d2_setalpha(u->d2_handle, dsc->opa); d2_setalpha(u->d2_handle, dsc->opa);
} }
d2_cliprect(u->d2_handle, (d2_border)draw_area.x1, (d2_border)draw_area.y1, (d2_border)draw_area.x2, d2_cliprect(u->d2_handle, (d2_border)draw_area.x1, (d2_border)draw_area.y1, (d2_border)draw_area.x2,
(d2_border)draw_area.y2); (d2_border)draw_area.y2);

View File

@@ -14,14 +14,11 @@
#include "../../../stdlib/lv_string.h" #include "../../../stdlib/lv_string.h"
#include "../../../core/lv_global.h" #include "../../../core/lv_global.h"
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MAX_BUF_SIZE (uint32_t) (4 * lv_display_get_horizontal_resolution(_lv_refr_get_disp_refreshing()) * lv_color_format_get_size(lv_display_get_color_format(_lv_refr_get_disp_refreshing()))) #define MAX_BUF_SIZE (uint32_t) (4 * lv_display_get_horizontal_resolution(_lv_refr_get_disp_refreshing()) * lv_color_format_get_size(lv_display_get_color_format(_lv_refr_get_disp_refreshing())))
static void dave2d_img_draw_normal(lv_draw_dave2d_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, static void dave2d_img_draw_normal(lv_draw_dave2d_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc,
const lv_area_t * coords); const lv_area_t * coords);
@@ -187,7 +184,6 @@ static void dave2d_img_draw_core(lv_draw_dave2d_unit_t * u, const lv_draw_image_
d2_u32 src_blend_mode; d2_u32 src_blend_mode;
d2_u32 dst_blend_mode; d2_u32 dst_blend_mode;
if(LV_COLOR_FORMAT_RGB565A8 == header->cf) { if(LV_COLOR_FORMAT_RGB565A8 == header->cf) {
/* Colour format not support by Dave2D */ /* Colour format not support by Dave2D */
sw_fallback_img_draw_core(&u->base_unit, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); sw_fallback_img_draw_core(&u->base_unit, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area);

View File

@@ -4,7 +4,6 @@
static void lv_draw_dave2d_draw_letter_cb(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * glyph_draw_dsc, static void lv_draw_dave2d_draw_letter_cb(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * glyph_draw_dsc,
lv_draw_fill_dsc_t * fill_draw_dsc, const lv_area_t * fill_area); lv_draw_fill_dsc_t * fill_draw_dsc, const lv_area_t * fill_area);
static lv_draw_dave2d_unit_t * unit = NULL; static lv_draw_dave2d_unit_t * unit = NULL;
void lv_draw_dave2d_label(lv_draw_dave2d_unit_t * u, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords) void lv_draw_dave2d_label(lv_draw_dave2d_unit_t * u, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords)
@@ -67,7 +66,6 @@ static void lv_draw_dave2d_draw_letter_cb(lv_draw_unit_t * u, lv_draw_glyph_dsc_
current_fillmode = d2_getfillmode(unit->d2_handle); current_fillmode = d2_getfillmode(unit->d2_handle);
d2_cliprect(unit->d2_handle, (d2_border)clip_area.x1, (d2_border)clip_area.y1, (d2_border)clip_area.x2, d2_cliprect(unit->d2_handle, (d2_border)clip_area.x1, (d2_border)clip_area.y1, (d2_border)clip_area.x2,
(d2_border)clip_area.y2); (d2_border)clip_area.y2);
@@ -124,7 +122,6 @@ static void lv_draw_dave2d_draw_letter_cb(lv_draw_unit_t * u, lv_draw_glyph_dsc_
(d2_point)D2_FIX4(lv_area_get_width(&letter_coords)), (d2_point)D2_FIX4(lv_area_get_width(&letter_coords)),
(d2_point)D2_FIX4(lv_area_get_height(&letter_coords))); (d2_point)D2_FIX4(lv_area_get_height(&letter_coords)));
d2_setfillmode(unit->d2_handle, current_fillmode); d2_setfillmode(unit->d2_handle, current_fillmode);
} }
else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE) { else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE) {
@@ -154,7 +151,6 @@ static void lv_draw_dave2d_draw_letter_cb(lv_draw_unit_t * u, lv_draw_glyph_dsc_
lv_draw_dave2d_fill(unit, fill_draw_dsc, fill_area); lv_draw_dave2d_fill(unit, fill_draw_dsc, fill_area);
} }
#if LV_USE_OS #if LV_USE_OS
status = lv_mutex_unlock(unit->pd2Mutex); status = lv_mutex_unlock(unit->pd2Mutex);
if(LV_RESULT_OK != status) { if(LV_RESULT_OK != status) {

View File

@@ -1,7 +1,6 @@
#include "lv_draw_dave2d.h" #include "lv_draw_dave2d.h"
#if LV_USE_DRAW_DAVE2D #if LV_USE_DRAW_DAVE2D
void lv_draw_dave2d_line(lv_draw_dave2d_unit_t * u, const lv_draw_line_dsc_t * dsc) void lv_draw_dave2d_line(lv_draw_dave2d_unit_t * u, const lv_draw_line_dsc_t * dsc)
{ {
@@ -17,7 +16,6 @@ void lv_draw_dave2d_line(lv_draw_dave2d_unit_t * u, const lv_draw_line_dsc_t * d
int32_t x; int32_t x;
int32_t y; int32_t y;
clip_line.x1 = LV_MIN(dsc->p1.x, dsc->p2.x) - dsc->width / 2; clip_line.x1 = LV_MIN(dsc->p1.x, dsc->p2.x) - dsc->width / 2;
clip_line.x2 = LV_MAX(dsc->p1.x, dsc->p2.x) + dsc->width / 2; clip_line.x2 = LV_MAX(dsc->p1.x, dsc->p2.x) + dsc->width / 2;
clip_line.y1 = LV_MIN(dsc->p1.y, dsc->p2.y) - dsc->width / 2; clip_line.y1 = LV_MIN(dsc->p1.y, dsc->p2.y) - dsc->width / 2;
@@ -69,10 +67,8 @@ void lv_draw_dave2d_line(lv_draw_dave2d_unit_t * u, const lv_draw_line_dsc_t * d
d2_setcolor(u->d2_handle, 0, lv_draw_dave2d_lv_colour_to_d2_colour(dsc->color)); d2_setcolor(u->d2_handle, 0, lv_draw_dave2d_lv_colour_to_d2_colour(dsc->color));
d2_setalpha(u->d2_handle, dsc->opa); d2_setalpha(u->d2_handle, dsc->opa);
d2_cliprect(u->d2_handle, clip_line.x1, clip_line.y1, clip_line.x2, clip_line.y2); d2_cliprect(u->d2_handle, clip_line.x1, clip_line.y1, clip_line.x2, clip_line.y2);
if((dsc->round_end == 1) || (dsc->round_start == 1)) { if((dsc->round_end == 1) || (dsc->round_start == 1)) {
@@ -84,7 +80,6 @@ void lv_draw_dave2d_line(lv_draw_dave2d_unit_t * u, const lv_draw_line_dsc_t * d
d2_setlinecap(u->d2_handle, mode); d2_setlinecap(u->d2_handle, mode);
d2_renderline(u->d2_handle, D2_FIX4(p1_x), D2_FIX4(p1_y), D2_FIX4(p2_x), d2_renderline(u->d2_handle, D2_FIX4(p1_x), D2_FIX4(p1_y), D2_FIX4(p2_x),
D2_FIX4(p2_y), D2_FIX4(dsc->width), d2_le_exclude_none); D2_FIX4(p2_y), D2_FIX4(dsc->width), d2_le_exclude_none);

View File

@@ -21,7 +21,6 @@ void lv_draw_dave2d_mask_rect(lv_draw_dave2d_unit_t * u, const lv_draw_mask_rect
lv_area_move(&buffer_area, x, y); lv_area_move(&buffer_area, x, y);
lv_area_move(&coordinates, x, y); lv_area_move(&coordinates, x, y);
#if LV_USE_OS #if LV_USE_OS
lv_result_t status; lv_result_t status;
status = lv_mutex_lock(u->pd2Mutex); status = lv_mutex_lock(u->pd2Mutex);
@@ -41,7 +40,6 @@ void lv_draw_dave2d_mask_rect(lv_draw_dave2d_unit_t * u, const lv_draw_mask_rect
(d2_u32)lv_area_get_height(&u->base_unit.target_layer->buf_area), (d2_u32)lv_area_get_height(&u->base_unit.target_layer->buf_area),
lv_draw_dave2d_cf_fb_get()); lv_draw_dave2d_cf_fb_get());
d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2, d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2,
(d2_border)clipped_area.y2); (d2_border)clipped_area.y2);

View File

@@ -1,7 +1,6 @@
#include "lv_draw_dave2d.h" #include "lv_draw_dave2d.h"
#if LV_USE_DRAW_DAVE2D #if LV_USE_DRAW_DAVE2D
void lv_draw_dave2d_triangle(lv_draw_dave2d_unit_t * u, const lv_draw_triangle_dsc_t * dsc) void lv_draw_dave2d_triangle(lv_draw_dave2d_unit_t * u, const lv_draw_triangle_dsc_t * dsc)
{ {
lv_area_t clipped_area; lv_area_t clipped_area;
@@ -17,7 +16,6 @@ void lv_draw_dave2d_triangle(lv_draw_dave2d_unit_t * u, const lv_draw_triangle_d
tri_area.x2 = LV_MAX3(dsc->p[0].x, dsc->p[1].x, dsc->p[2].x); tri_area.x2 = LV_MAX3(dsc->p[0].x, dsc->p[1].x, dsc->p[2].x);
tri_area.y2 = LV_MAX3(dsc->p[0].y, dsc->p[1].y, dsc->p[2].y); tri_area.y2 = LV_MAX3(dsc->p[0].y, dsc->p[1].y, dsc->p[2].y);
if(!_lv_area_intersect(&clipped_area, &tri_area, u->base_unit.clip_area)) return; if(!_lv_area_intersect(&clipped_area, &tri_area, u->base_unit.clip_area)) return;
#if LV_USE_OS #if LV_USE_OS
@@ -50,7 +48,6 @@ void lv_draw_dave2d_triangle(lv_draw_dave2d_unit_t * u, const lv_draw_triangle_d
* [1]: right bottom * [1]: right bottom
* [2]: left bottom */ * [2]: left bottom */
if(dsc->p[0].y <= dsc->p[1].y && dsc->p[0].y <= dsc->p[2].y) { if(dsc->p[0].y <= dsc->p[1].y && dsc->p[0].y <= dsc->p[2].y) {
p[0] = dsc->p[0]; p[0] = dsc->p[0];
if(dsc->p[1].x < dsc->p[2].x) { if(dsc->p[1].x < dsc->p[2].x) {
@@ -153,7 +150,6 @@ void lv_draw_dave2d_triangle(lv_draw_dave2d_unit_t * u, const lv_draw_triangle_d
(d2_u32)lv_area_get_height(&buffer_area), (d2_u32)lv_area_get_height(&buffer_area),
lv_draw_dave2d_cf_fb_get()); lv_draw_dave2d_cf_fb_get());
d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2, d2_cliprect(u->d2_handle, (d2_border)clipped_area.x1, (d2_border)clipped_area.y1, (d2_border)clipped_area.x2,
(d2_border)clipped_area.y2); (d2_border)clipped_area.y2);
@@ -176,17 +172,14 @@ void lv_draw_dave2d_triangle(lv_draw_dave2d_unit_t * u, const lv_draw_triangle_d
d2_setalphamode(u->d2_handle, current_alpha_mode); d2_setalphamode(u->d2_handle, current_alpha_mode);
#if LV_USE_OS #if LV_USE_OS
status = lv_mutex_unlock(u->pd2Mutex); status = lv_mutex_unlock(u->pd2Mutex);
if(LV_RESULT_OK != status) { if(LV_RESULT_OK != status) {
__BKPT(0); __BKPT(0);
} }
#endif #endif
} }
#endif /*LV_USE_DRAW_DAVE2D*/ #endif /*LV_USE_DRAW_DAVE2D*/

View File

@@ -113,7 +113,6 @@ d2_u32 lv_draw_dave2d_lv_colour_fmt_to_d2_fmt(lv_color_format_t colour_format)
return d2_lvgl_mode; return d2_lvgl_mode;
} }
/********************** /**********************
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/

View File

@@ -180,7 +180,6 @@ void lv_init(void)
lv_draw_sdl_init(); lv_draw_sdl_init();
#endif #endif
_lv_obj_style_init(); _lv_obj_style_init();
/*Initialize the screen refresh system*/ /*Initialize the screen refresh system*/