New BufferedWindow class for avoiding redrawing a window which doesn't need

This commit is contained in:
Bertrand Songis
2020-03-05 23:07:17 +01:00
parent 4e47630eec
commit 94c6ab1ddd
2 changed files with 56 additions and 2 deletions
+1 -2
View File
@@ -241,7 +241,6 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
#endif
public:
BitmapBuffer(uint8_t format, uint16_t width, uint16_t height):
BitmapBufferBase<uint16_t>(format, width, height, nullptr),
dataAllocated(true)
@@ -390,7 +389,7 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
coord_t drawNumber(coord_t x, coord_t y, int32_t val, LcdFlags flags = 0, uint8_t len = 0, const char * prefix = nullptr, const char * suffix = nullptr);
template<class T>
void drawBitmap(coord_t x, coord_t y, const T * bmp, coord_t srcx=0, coord_t srcy=0, coord_t w=0, coord_t h=0, float scale=0)
void drawBitmap(coord_t x, coord_t y, const T * bmp, coord_t srcx = 0, coord_t srcy = 0, coord_t w = 0, coord_t h = 0, float scale = 0)
{
if (!data || !bmp)
return;