[DP/GFX/SDMMC] Bugfixes
- Sanitize framebuffer. Original idea from @StevenMattera - Change clear framebuffer to memset (for grey colors), for performance (we don't use alpha blending, so it does not matter to set it to 0xFF). - Enable screen backlight after gfx init - Reduce wait time for emmc/sd read/write retries to 100ms.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "gfx.h"
|
||||
|
||||
static const u8 _gfx_font[] = {
|
||||
@@ -76,7 +77,12 @@ void gfx_init_ctxt(gfx_ctxt_t *ctxt, u32 *fb, u32 width, u32 height, u32 stride)
|
||||
ctxt->stride = stride;
|
||||
}
|
||||
|
||||
void gfx_clear(gfx_ctxt_t *ctxt, u32 color)
|
||||
void gfx_clear_grey(gfx_ctxt_t *ctxt, u8 color)
|
||||
{
|
||||
memset(ctxt->fb, color, 0x400000);
|
||||
}
|
||||
|
||||
void gfx_clear_color(gfx_ctxt_t *ctxt, u32 color)
|
||||
{
|
||||
for (u32 i = 0; i < ctxt->height * ctxt->stride; i++)
|
||||
ctxt->fb[i] = color;
|
||||
|
||||
Reference in New Issue
Block a user