fix(draw-buff): fix _LV_DRAW_BUF_STRIDE (#5091)

This commit is contained in:
Gabriel Wang
2023-12-26 02:35:20 +00:00
committed by GitHub
parent 8e4b7f5676
commit 7c8e5d411d
+1 -1
View File
@@ -39,7 +39,7 @@ typedef struct {
*/
#define _LV_DRAW_BUF_STRIDE(w, cf) \
(((w) * LV_COLOR_FORMAT_GET_BPP(cf) + 7) / 8 + (LV_DRAW_BUF_STRIDE_ALIGN) - 1)
((((w) * LV_COLOR_FORMAT_GET_BPP(cf) + 7) / 8 + (LV_DRAW_BUF_STRIDE_ALIGN) - 1) & ~((LV_DRAW_BUF_STRIDE_ALIGN) - 1))
#define _LV_DRAW_BUF_SIZE(w, h, cf) \
(_LV_DRAW_BUF_STRIDE(w, cf) * (h))