[Horus] Revert to BMP bitmaps instead of PNG. It uses far less CPU

This commit is contained in:
Bertrand Songis
2016-03-01 19:01:31 +01:00
parent 8427e6ed04
commit 9a615adff7
29 changed files with 226 additions and 30 deletions
+9
View File
@@ -105,6 +105,11 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
}
}
inline void setFormat(uint8_t format)
{
this->format = format;
}
inline void clear()
{
drawSolidFilledRect(0, 0, width, height, 0);
@@ -230,6 +235,10 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
drawBitmap(x+(w-width)/2, y, bitmap, 0, 0, 0, 0, scale);
}
}
protected:
static BitmapBuffer * load_bmp(const char * filename);
static BitmapBuffer * load_stb(const char * filename);
};
extern BitmapBuffer * lcd;