1 --- a/drv_generic_graphic.c
2 +++ b/drv_generic_graphic.c
12 @@ -98,6 +98,9 @@ static int INVERTED = 0;
13 /* must be implemented by the real driver */
14 void (*drv_generic_graphic_real_blit) () = NULL;
16 +/* can be implemented by the real driver */
17 +void (*drv_generic_graphic_real_clear) () = NULL;
20 /****************************************/
21 /*** generic Framebuffer stuff ***/
22 @@ -691,7 +694,10 @@ int drv_generic_graphic_clear(void)
23 for (i = 0; i < LCOLS * LROWS; i++)
24 drv_generic_graphic_FB[l][i] = NO_COL;
26 - drv_generic_graphic_blit(0, 0, LROWS, LCOLS);
27 + if (drv_generic_graphic_real_clear)
28 + drv_generic_graphic_real_clear(NO_COL);
30 + drv_generic_graphic_blit(0, 0, LROWS, LCOLS);
34 --- a/drv_generic_graphic.h
35 +++ b/drv_generic_graphic.h
36 @@ -40,6 +40,9 @@ extern RGBA NO_COL; /* no color (comple
37 /* these functions must be implemented by the real driver */
38 extern void (*drv_generic_graphic_real_blit) (const int row, const int col, const int height, const int width);
40 +/* these functions can be implemented by the real driver */
41 +void (*drv_generic_graphic_real_clear) (const RGBA rgba);
43 /* helper function to get pixel color or gray value */
44 extern RGBA drv_generic_graphic_rgb(const int row, const int col);
45 extern unsigned char drv_generic_graphic_gray(const int row, const int col);