Skip to content

Commit

Permalink
Release v7.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Mar 16, 2021
1 parent fa2c817 commit ec9de51
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kconfig file for LVGL v7.10.1
# Kconfig file for LVGL v7.11.0

menu "LVGL configuration"

Expand Down
2 changes: 1 addition & 1 deletion lv_conf_template.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
* Configuration file for v7.10.1
* Configuration file for v7.11.0
*/

/*
Expand Down
2 changes: 1 addition & 1 deletion lvgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern "C" {
#define LVGL_VERSION_MAJOR 7
#define LVGL_VERSION_MINOR 11
#define LVGL_VERSION_PATCH 0
#define LVGL_VERSION_INFO "dev"
#define LVGL_VERSION_INFO ""

/*********************
* INCLUDES
Expand Down
2 changes: 1 addition & 1 deletion src/lv_core/lv_indev.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev)
*/
static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
{
lv_disp_t *disp = i->driver.disp;
lv_disp_t * disp = i->driver.disp;
if(disp->driver.rotated == LV_DISP_ROT_180 || disp->driver.rotated == LV_DISP_ROT_270) {
data->point.x = disp->driver.hor_res - data->point.x - 1;
data->point.y = disp->driver.ver_res - data->point.y - 1;
Expand Down
59 changes: 36 additions & 23 deletions src/lv_core/lv_refr.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,8 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
}
}

static void lv_refr_vdb_rotate_180(lv_disp_drv_t *drv, lv_area_t *area, lv_color_t *color_p) {
static void lv_refr_vdb_rotate_180(lv_disp_drv_t * drv, lv_area_t * area, lv_color_t * color_p)
{
lv_coord_t area_w = lv_area_get_width(area);
lv_coord_t area_h = lv_area_get_height(area);
uint32_t total = area_w * area_h;
Expand All @@ -764,8 +765,10 @@ static void lv_refr_vdb_rotate_180(lv_disp_drv_t *drv, lv_area_t *area, lv_color
area->x1 = drv->hor_res - tmp_coord - 1;
}

static LV_ATTRIBUTE_FAST_MEM void lv_refr_vdb_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h, lv_color_t *orig_color_p, lv_color_t *rot_buf) {

static LV_ATTRIBUTE_FAST_MEM void lv_refr_vdb_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h,
lv_color_t * orig_color_p, lv_color_t * rot_buf)
{

uint32_t invert = (area_w * area_h) - 1;
uint32_t initial_i = ((area_w - 1) * area_h);
for(lv_coord_t y = 0; y < area_h; y++) {
Expand All @@ -785,7 +788,8 @@ static LV_ATTRIBUTE_FAST_MEM void lv_refr_vdb_rotate_90(bool invert_i, lv_coord_
/**
* Helper function for lv_refr_vdb_rotate_90_sqr. Given a list of four numbers, rotate the entire list to the left.
*/
static inline void lv_vdb_rotate4(lv_color_t *a, lv_color_t *b, lv_color_t * c, lv_color_t * d) {
static inline void lv_vdb_rotate4(lv_color_t * a, lv_color_t * b, lv_color_t * c, lv_color_t * d)
{
lv_color_t tmp;
tmp = *a;
*a = *b;
Expand All @@ -798,9 +802,10 @@ static inline void lv_vdb_rotate4(lv_color_t *a, lv_color_t *b, lv_color_t * c,
* Rotate a square image 90/270 degrees in place.
* @note inspired by https://stackoverflow.com/a/43694906
*/
static void lv_refr_vdb_rotate_90_sqr(bool is_270, lv_coord_t w, lv_color_t * color_p) {
for(lv_coord_t i = 0; i < w/2; i++) {
for(lv_coord_t j = 0; j < (w + 1)/2; j++) {
static void lv_refr_vdb_rotate_90_sqr(bool is_270, lv_coord_t w, lv_color_t * color_p)
{
for(lv_coord_t i = 0; i < w / 2; i++) {
for(lv_coord_t j = 0; j < (w + 1) / 2; j++) {
lv_coord_t inv_i = (w - 1) - i;
lv_coord_t inv_j = (w - 1) - j;
if(is_270) {
Expand All @@ -810,23 +815,25 @@ static void lv_refr_vdb_rotate_90_sqr(bool is_270, lv_coord_t w, lv_color_t * co
&color_p[inv_i * w + inv_j],
&color_p[j * w + inv_i]
);
} else {
}
else {
lv_vdb_rotate4(
&color_p[i * w + j],
&color_p[j * w + inv_i],
&color_p[inv_i * w + inv_j],
&color_p[inv_j * w + i]
);
}

}
}
}

/**
* Rotate the VDB to the display's native orientation.
*/
static void lv_refr_vdb_rotate(lv_area_t *area, lv_color_t *color_p) {
static void lv_refr_vdb_rotate(lv_area_t * area, lv_color_t * color_p)
{
lv_disp_drv_t * drv = &disp_refr->driver;
if(lv_disp_is_true_double_buf(disp_refr) && drv->sw_rotate) {
LV_LOG_ERROR("cannot rotate a true double-buffered display!");
Expand All @@ -835,50 +842,55 @@ static void lv_refr_vdb_rotate(lv_area_t *area, lv_color_t *color_p) {
if(drv->rotated == LV_DISP_ROT_180) {
lv_refr_vdb_rotate_180(drv, area, color_p);
drv->flush_cb(drv, area, color_p);
} else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
}
else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
/*Allocate a temporary buffer to store rotated image */
lv_color_t * rot_buf = NULL;
lv_color_t * rot_buf = NULL;
lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
lv_coord_t area_w = lv_area_get_width(area);
lv_coord_t area_h = lv_area_get_height(area);
/*Determine the maximum number of rows that can be rotated at a time*/
lv_coord_t max_row = LV_MATH_MIN((lv_coord_t)((LV_DISP_ROT_MAX_BUF/sizeof(lv_color_t)) / area_w), area_h);
lv_coord_t max_row = LV_MATH_MIN((lv_coord_t)((LV_DISP_ROT_MAX_BUF / sizeof(lv_color_t)) / area_w), area_h);
lv_coord_t init_y_off;
init_y_off = area->y1;
if(drv->rotated == LV_DISP_ROT_90) {
area->y2 = drv->ver_res - area->x1 - 1;
area->y1 = area->y2 - area_w + 1;
} else {
}
else {
area->y1 = area->x1;
area->y2 = area->y1 + area_w - 1;
}
vdb->flushing = 0;
/*Rotate the screen in chunks, flushing after each one*/
lv_coord_t row = 0;
while(row < area_h) {
lv_coord_t height = LV_MATH_MIN(max_row, area_h-row);
lv_coord_t height = LV_MATH_MIN(max_row, area_h - row);
vdb->flushing = 1;
if((row == 0) && (area_h >= area_w)) {
/*Rotate the initial area as a square*/
height = area_w;
lv_refr_vdb_rotate_90_sqr(drv->rotated == LV_DISP_ROT_270, area_w, color_p);
if(drv->rotated == LV_DISP_ROT_90) {
area->x1 = init_y_off;
area->x2 = init_y_off+area_w-1;
} else {
area->x2 = init_y_off + area_w - 1;
}
else {
area->x2 = drv->hor_res - 1 - init_y_off;
area->x1 = area->x2 - area_w + 1;
}
} else {
}
else {
/*Rotate other areas using a maximum buffer size*/
if(rot_buf == NULL)
rot_buf = _lv_mem_buf_get(LV_DISP_ROT_MAX_BUF);
lv_refr_vdb_rotate_90(drv->rotated == LV_DISP_ROT_270, area_w, height, color_p, rot_buf);

if(drv->rotated == LV_DISP_ROT_90) {
area->x1 = init_y_off+row;
area->x2 = init_y_off+row+height-1;
} else {
area->x1 = init_y_off + row;
area->x2 = init_y_off + row + height - 1;
}
else {
area->x2 = drv->hor_res - 1 - init_y_off - row;
area->x1 = area->x2 - height + 1;
}
Expand Down Expand Up @@ -927,7 +939,8 @@ static void lv_refr_vdb_flush(void)
/*Rotate the buffer to the display's native orientation if necessary*/
if(disp->driver.rotated != LV_DISP_ROT_NONE && disp->driver.sw_rotate) {
lv_refr_vdb_rotate(&vdb->area, vdb->buf_act);
} else {
}
else {
disp->driver.flush_cb(&disp->driver, &vdb->area, color_p);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lv_core/lv_style.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void lv_style_list_copy(lv_style_list_t * list_dest, const lv_style_list_t * lis
}

lv_style_t * local_style = get_alloc_local_style(list_dest);
if (local_style)
if(local_style)
lv_style_copy(local_style, get_alloc_local_style((lv_style_list_t *)list_src));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lv_core/lv_style.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ enum {
LV_STYLE_PROP_INIT(LV_STYLE_PATTERN_REPEAT, 0x6, LV_STYLE_ID_VALUE + 1, LV_STYLE_ATTR_NONE),
LV_STYLE_PROP_INIT(LV_STYLE_PATTERN_RECOLOR, 0x6, LV_STYLE_ID_COLOR + 0, LV_STYLE_ATTR_NONE),
LV_STYLE_PROP_INIT(LV_STYLE_PATTERN_OPA, 0x6, LV_STYLE_ID_OPA + 0, LV_STYLE_ATTR_NONE),
LV_STYLE_PROP_INIT(LV_STYLE_PATTERN_RECOLOR_OPA,0x6, LV_STYLE_ID_OPA + 1, LV_STYLE_ATTR_NONE),
LV_STYLE_PROP_INIT(LV_STYLE_PATTERN_RECOLOR_OPA, 0x6, LV_STYLE_ID_OPA + 1, LV_STYLE_ATTR_NONE),
LV_STYLE_PROP_INIT(LV_STYLE_PATTERN_IMAGE, 0x6, LV_STYLE_ID_PTR + 0, LV_STYLE_ATTR_NONE),

LV_STYLE_PROP_INIT(LV_STYLE_VALUE_LETTER_SPACE, 0x7, LV_STYLE_ID_VALUE + 0, LV_STYLE_ATTR_NONE),
Expand Down
2 changes: 1 addition & 1 deletion src/lv_draw/lv_img_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* STATIC PROTOTYPES
**********************/
#if LV_IMG_CACHE_DEF_SIZE
static bool lv_img_cache_match(const void * src1, const void * src2);
static bool lv_img_cache_match(const void * src1, const void * src2);
#endif

#if LV_IMG_CACHE_DEF_SIZE == 0
Expand Down
6 changes: 3 additions & 3 deletions src/lv_draw/lv_img_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void _lv_img_decoder_init(void)
*/
lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header)
{
_lv_memset_00(header, sizeof(lv_img_header_t));
_lv_memset_00(header, sizeof(lv_img_header_t));

lv_res_t res = LV_RES_INV;
lv_img_decoder_t * d;
Expand Down Expand Up @@ -629,7 +629,7 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l
#if LV_USE_FILESYSTEM
lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
uint8_t * fs_buf = _lv_mem_buf_get(w);
if (fs_buf == NULL) return LV_RES_INV;
if(fs_buf == NULL) return LV_RES_INV;
#endif

const uint8_t * data_tmp = NULL;
Expand Down Expand Up @@ -713,7 +713,7 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc,

#if LV_USE_FILESYSTEM
uint8_t * fs_buf = _lv_mem_buf_get(w);
if (fs_buf == NULL) return LV_RES_INV;
if(fs_buf == NULL) return LV_RES_INV;
#endif
const uint8_t * data_tmp = NULL;
if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
Expand Down
4 changes: 2 additions & 2 deletions src/lv_hal/lv_hal_disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver)
* @param new_drv pointer to the new driver
*/
void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv)
{
{
if(new_drv != &disp->driver)
memcpy(&disp->driver, new_drv, sizeof(lv_disp_drv_t));

lv_obj_t * scr;
_LV_LL_READ(disp->scr_ll, scr) {
lv_obj_set_size(scr, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp));
Expand Down
3 changes: 2 additions & 1 deletion src/lv_widgets/lv_bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ static void draw_indic(lv_obj_t * bar, const lv_area_t * clip_area)
*axis1 = *axis2;
*axis2 = zero;
}
} else {
}
else {
zero = *axis2 - shift + 1;
if(*axis1 > zero)
*axis2 = zero;
Expand Down
8 changes: 4 additions & 4 deletions src/lv_widgets/lv_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,10 @@ void lv_label_refr_text(lv_obj_t * label)
lv_anim_value_t start, end;
lv_bidi_dir_t base_dir = lv_obj_get_base_dir(label);

if (base_dir == LV_BIDI_DIR_AUTO)
if(base_dir == LV_BIDI_DIR_AUTO)
base_dir = _lv_bidi_detect_base_dir(ext->text);

if (base_dir == LV_BIDI_DIR_RTL) {
if(base_dir == LV_BIDI_DIR_RTL) {
start = lv_area_get_width(&txt_coords) - size.x;
end = 0;
}
Expand Down Expand Up @@ -1136,10 +1136,10 @@ void lv_label_refr_text(lv_obj_t * label)
lv_anim_value_t start, end;
lv_bidi_dir_t base_dir = lv_obj_get_base_dir(label);

if (base_dir == LV_BIDI_DIR_AUTO)
if(base_dir == LV_BIDI_DIR_AUTO)
base_dir = _lv_bidi_detect_base_dir(ext->text);

if (base_dir == LV_BIDI_DIR_RTL) {
if(base_dir == LV_BIDI_DIR_RTL) {
start = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT;
end = 0;
}
Expand Down

0 comments on commit ec9de51

Please sign in to comment.