From e575d122a16cb6ab2da76bcb769ddccc87486a33 Mon Sep 17 00:00:00 2001 From: Malte Langermann Date: Wed, 19 Jan 2022 21:11:51 +0100 Subject: [PATCH] use the lvgl canvas buffer to directly draw on --- radio/src/thirdparty/libopenui/src/mainwindow.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/radio/src/thirdparty/libopenui/src/mainwindow.cpp b/radio/src/thirdparty/libopenui/src/mainwindow.cpp index 8300bc18f..f8e211c15 100644 --- a/radio/src/thirdparty/libopenui/src/mainwindow.cpp +++ b/radio/src/thirdparty/libopenui/src/mainwindow.cpp @@ -193,15 +193,13 @@ void MainWindow::invalidate(const rect_t & rect) } #include "lvgl/lvgl.h" extern lv_obj_t * canvas; -extern BitmapBuffer lcdBackup; +extern BitmapBuffer canBuf; bool MainWindow::refresh() { if (invalidatedRect.w) { - lcdBackup.setOffset(0, 0); - lcdBackup.setClippingRect(0,LCD_W,0, LCD_H); - fullPaint(&lcdBackup); - lv_canvas_copy_buf(canvas, lcdBackup.getData(), 0, 0, LCD_W, LCD_H); - lv_img_cache_invalidate_src(lcdBackup.getData()); + canBuf.setOffset(0, 0); + canBuf.setClippingRect(0,LCD_W,0, LCD_H); + fullPaint(&canBuf); lv_obj_invalidate(canvas); } return false;