diff options
Diffstat (limited to 'src/draw/lv_draw_buf.h')
-rw-r--r-- | src/draw/lv_draw_buf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/draw/lv_draw_buf.h b/src/draw/lv_draw_buf.h index 4fd0ee7bb..05f54780a 100644 --- a/src/draw/lv_draw_buf.h +++ b/src/draw/lv_draw_buf.h @@ -47,7 +47,9 @@ typedef struct { LV_ROUND_UP(((w) * LV_COLOR_FORMAT_GET_BPP(cf) + 7) / 8, LV_DRAW_BUF_STRIDE_ALIGN) /* Allocate a slightly larger buffer, so we can adjust the start address to meet alignment */ -#define _LV_DRAW_BUF_SIZE(w, h, cf) (_LV_DRAW_BUF_STRIDE(w, cf) * (h) + LV_DRAW_BUF_ALIGN) +#define _LV_DRAW_BUF_SIZE(w, h, cf) \ + (_LV_DRAW_BUF_STRIDE(w, cf) * (h) + LV_DRAW_BUF_ALIGN + \ + LV_COLOR_INDEXED_PALETTE_SIZE(cf) * sizeof(lv_color32_t)) /** * Define a static draw buffer with the given width, height, and color format. |