|
--- a/drv_generic_graphic.c
|
|
+++ b/drv_generic_graphic.c
|
|
@@ -24,7 +24,7 @@
|
|
*
|
|
*/
|
|
|
|
-/*
|
|
+/*
|
|
*
|
|
* exported functions:
|
|
*
|
|
@@ -98,6 +98,9 @@ static int INVERTED = 0;
|
|
/* must be implemented by the real driver */
|
|
void (*drv_generic_graphic_real_blit) () = NULL;
|
|
|
|
+/* can be implemented by the real driver */
|
|
+void (*drv_generic_graphic_real_clear) () = NULL;
|
|
+
|
|
|
|
/****************************************/
|
|
/*** generic Framebuffer stuff ***/
|
|
@@ -691,7 +694,10 @@ int drv_generic_graphic_clear(void)
|
|
for (i = 0; i < LCOLS * LROWS; i++)
|
|
drv_generic_graphic_FB[l][i] = NO_COL;
|
|
|
|
- drv_generic_graphic_blit(0, 0, LROWS, LCOLS);
|
|
+ if (drv_generic_graphic_real_clear)
|
|
+ drv_generic_graphic_real_clear(NO_COL);
|
|
+ else
|
|
+ drv_generic_graphic_blit(0, 0, LROWS, LCOLS);
|
|
|
|
return 0;
|
|
}
|
|
--- a/drv_generic_graphic.h
|
|
+++ b/drv_generic_graphic.h
|
|
@@ -40,6 +40,9 @@ extern RGBA NO_COL; /* no color (comple
|
|
/* these functions must be implemented by the real driver */
|
|
extern void (*drv_generic_graphic_real_blit) (const int row, const int col, const int height, const int width);
|
|
|
|
+/* these functions can be implemented by the real driver */
|
|
+void (*drv_generic_graphic_real_clear) (const RGBA rgba);
|
|
+
|
|
/* helper function to get pixel color or gray value */
|
|
extern RGBA drv_generic_graphic_rgb(const int row, const int col);
|
|
extern unsigned char drv_generic_graphic_gray(const int row, const int col);
|