From 28a58b85432e8725787d852b6917fb30d13daa01 Mon Sep 17 00:00:00 2001 From: Andrew Capon Date: Fri, 20 Oct 2023 11:42:34 +0100 Subject: [PATCH 1/2] Simple Speedup --- libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp b/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp index 43ec72919..72bc3c524 100644 --- a/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp +++ b/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp @@ -199,4 +199,4 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color } #endif -/**** END OF FILE ****/ \ No newline at end of file +/**** END OF FILE ****/ From 944dbbe112d4c4ab1a0d99f04dfcb28ccb557856 Mon Sep 17 00:00:00 2001 From: Andrew Capon Date: Fri, 20 Oct 2023 11:58:05 +0100 Subject: [PATCH 2/2] Simple Speedup --- libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp b/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp index 72bc3c524..dd0a36e90 100644 --- a/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp +++ b/libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp @@ -144,7 +144,9 @@ void Arduino_H7_Video::beginDraw() { void Arduino_H7_Video::endDraw() { ArduinoGraphics::endDraw(); - +#ifdef CORE_CM7 + SCB_CleanInvalidateDCache(); +#endif dsi_drawCurrentFrameBuffer(); } @@ -184,7 +186,9 @@ void Arduino_H7_Video::set(int x, int y, uint8_t r, uint8_t g, uint8_t b) { return; uint32_t color = (uint32_t)((uint32_t)(r << 16) | (uint32_t)(g << 8) | (uint32_t)(b << 0)); - dsi_lcdFillArea((void *)(dsi_getCurrentFrameBuffer() + ((x_rot + (dsi_getDisplayXSize() * y_rot)) * sizeof(uint16_t))), 1, 1, color); + + uint16_t *pData = (uint16_t *)dsi_getCurrentFrameBuffer() + ((x_rot + (dsi_getDisplayXSize() * y_rot))); + *pData = color; } #endif