fix(draw): make SW render work with any stride and add stride=64 to CI
This commit is contained in:
@@ -87,7 +87,7 @@ typedef void * lv_user_data_t;
|
||||
#undef LV_LOG_PRINTF
|
||||
|
||||
/*Use a large value be sure any issues will cause crash*/
|
||||
//#define LV_DRAW_BUF_STRIDE_ALIGN 64
|
||||
#define LV_DRAW_BUF_STRIDE_ALIGN 64
|
||||
|
||||
/*Use non power of 2 to avoid the case when `malloc` returns aligned pointer by default, and use a large value be sure any issues will cause crash*/
|
||||
#define LV_DRAW_BUF_ALIGN 852
|
||||
|
||||
@@ -153,7 +153,7 @@ static void create_ui(void)
|
||||
}
|
||||
|
||||
/*Large byte array*/
|
||||
static uint8_t canvas_buf[CANVAS_WIDTH_TO_STRIDE(400, 2) * 100 * 2];
|
||||
static uint8_t canvas_buf[CANVAS_WIDTH_TO_STRIDE(400, 2) * 100 * 2 + LV_DRAW_BUF_ALIGN];
|
||||
|
||||
lv_obj_t * canvas = lv_canvas_create(scr);
|
||||
lv_obj_set_grid_cell(canvas, LV_GRID_ALIGN_START, 0, 2, LV_GRID_ALIGN_START, 2, 1);
|
||||
|
||||
Reference in New Issue
Block a user