From 0a32f38f91cb20f4d75f5782def66c7cd9729f36 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Mon, 13 Apr 2020 12:44:49 -0400 Subject: [PATCH] update display draw functions - release --- components/display/core/gds_draw_ext.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/display/core/gds_draw_ext.c b/components/display/core/gds_draw_ext.c index 16abbc96..12916a3d 100644 --- a/components/display/core/gds_draw_ext.c +++ b/components/display/core/gds_draw_ext.c @@ -11,8 +11,12 @@ #include "gds_draw.h" void IRAM_ATTR GDS_DrawPixelExt( struct GDS_Device* Device, int X, int Y, int Color ){ - GDS_DrawPixel( Device, X, Y, Color ); + if ( IsPixelVisible( Device, X, Y ) == true ) { + GDS_DrawPixelFast( Device, X, Y, Color ); + } } void IRAM_ATTR GDS_DrawPixelFastExt( struct GDS_Device* Device, int X, int Y, int Color ){ - GDS_DrawPixelFast( Device, X, Y, Color ); + if (Device->DrawPixelFast) Device->DrawPixelFast( Device, X, Y, Color ); + else if (Device->Depth == 4) GDS_DrawPixel4Fast( Device, X, Y, Color); + else if (Device->Depth == 1) GDS_DrawPixel1Fast( Device, X, Y, Color); }