fix(draw): fix compiler error when LV_DRAW_SW_COMPLEX is disabled (#5695)
This commit is contained in:
committed by
GitHub
parent
8a85a49801
commit
616d52a01b
@@ -270,5 +270,16 @@ static void get_rounded_area(int16_t angle, int32_t radius, uint8_t thickness, l
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /*LV_DRAW_SW_COMPLEX*/
|
||||||
|
|
||||||
|
void lv_draw_sw_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, const lv_area_t * coords)
|
||||||
|
{
|
||||||
|
LV_UNUSED(draw_unit);
|
||||||
|
LV_UNUSED(dsc);
|
||||||
|
LV_UNUSED(coords);
|
||||||
|
|
||||||
|
LV_LOG_WARN("LV_DRAW_SW_COMPLEX needs to be enabled");
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*LV_DRAW_SW_COMPLEX*/
|
#endif /*LV_DRAW_SW_COMPLEX*/
|
||||||
#endif /*LV_USE_DRAW_SW*/
|
#endif /*LV_USE_DRAW_SW*/
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#include "lv_draw_sw.h"
|
#include "lv_draw_sw.h"
|
||||||
#if LV_USE_DRAW_SW
|
#if LV_USE_DRAW_SW
|
||||||
|
|
||||||
|
#if LV_DRAW_SW_COMPLEX
|
||||||
|
|
||||||
#include "blend/lv_draw_sw_blend.h"
|
#include "blend/lv_draw_sw_blend.h"
|
||||||
#include "../../core/lv_global.h"
|
#include "../../core/lv_global.h"
|
||||||
#include "../../misc/lv_math.h"
|
#include "../../misc/lv_math.h"
|
||||||
@@ -34,11 +36,9 @@
|
|||||||
/**********************
|
/**********************
|
||||||
* STATIC PROTOTYPES
|
* STATIC PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
#if LV_DRAW_SW_COMPLEX
|
|
||||||
static void /* LV_ATTRIBUTE_FAST_MEM */ shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, int32_t s,
|
static void /* LV_ATTRIBUTE_FAST_MEM */ shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, int32_t s,
|
||||||
int32_t r);
|
int32_t r);
|
||||||
static void /* LV_ATTRIBUTE_FAST_MEM */ shadow_blur_corner(int32_t size, int32_t sw, uint16_t * sh_ups_buf);
|
static void /* LV_ATTRIBUTE_FAST_MEM */ shadow_blur_corner(int32_t size, int32_t sw, uint16_t * sh_ups_buf);
|
||||||
#endif /*LV_DRAW_SW_COMPLEX*/
|
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC VARIABLES
|
* STATIC VARIABLES
|
||||||
@@ -552,14 +552,11 @@ void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_
|
|||||||
lv_free(sh_buf);
|
lv_free(sh_buf);
|
||||||
lv_free(mask_buf);
|
lv_free(mask_buf);
|
||||||
}
|
}
|
||||||
#endif /*LV_USE_DRAW_SW*/
|
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC FUNCTIONS
|
* STATIC FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
#if LV_DRAW_SW_COMPLEX
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate a blurred corner
|
* Calculate a blurred corner
|
||||||
* @param coords Coordinates of the shadow
|
* @param coords Coordinates of the shadow
|
||||||
@@ -726,4 +723,18 @@ static void LV_ATTRIBUTE_FAST_MEM shadow_blur_corner(int32_t size, int32_t sw, u
|
|||||||
|
|
||||||
lv_free(sh_ups_blur_buf);
|
lv_free(sh_ups_blur_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /*LV_DRAW_SW_COMPLEX*/
|
||||||
|
|
||||||
|
void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_dsc_t * dsc, const lv_area_t * coords)
|
||||||
|
{
|
||||||
|
LV_UNUSED(draw_unit);
|
||||||
|
LV_UNUSED(dsc);
|
||||||
|
LV_UNUSED(coords);
|
||||||
|
|
||||||
|
LV_LOG_WARN("LV_DRAW_SW_COMPLEX needs to be enabled");
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*LV_DRAW_SW_COMPLEX*/
|
#endif /*LV_DRAW_SW_COMPLEX*/
|
||||||
|
|
||||||
|
#endif /*LV_DRAW_USE_SW*/
|
||||||
|
|||||||
@@ -117,5 +117,16 @@ void lv_draw_sw_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_rect_ds
|
|||||||
* STATIC FUNCTIONS
|
* STATIC FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
|
#else /*LV_DRAW_SW_COMPLEX*/
|
||||||
|
|
||||||
|
void lv_draw_sw_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_rect_dsc_t * dsc, const lv_area_t * coords)
|
||||||
|
{
|
||||||
|
LV_UNUSED(draw_unit);
|
||||||
|
LV_UNUSED(dsc);
|
||||||
|
LV_UNUSED(coords);
|
||||||
|
|
||||||
|
LV_LOG_WARN("LV_DRAW_SW_COMPLEX needs to be enabled");
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*LV_DRAW_SW_COMPLEX*/
|
#endif /*LV_DRAW_SW_COMPLEX*/
|
||||||
#endif /*LV_USE_DRAW_SW*/
|
#endif /*LV_USE_DRAW_SW*/
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ typedef void * lv_user_data_t;
|
|||||||
#elif LV_TEST_OPTION == 1
|
#elif LV_TEST_OPTION == 1
|
||||||
#define LV_COLOR_DEPTH 1
|
#define LV_COLOR_DEPTH 1
|
||||||
#define LV_DPI_DEF 30
|
#define LV_DPI_DEF 30
|
||||||
|
#define LV_DRAW_SW_COMPLEX 0
|
||||||
#include "lv_test_conf_minimal.h"
|
#include "lv_test_conf_minimal.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user