[OpenBIOS] [commit] r1149 - in trunk/openbios-devel: forth/device include/libopenbios libopenbios packages

repository service svn at openbios.org
Sun Jun 9 14:25:25 CEST 2013


Author: mcayland
Date: Sun Jun  9 14:25:25 2013
New Revision: 1149
URL: http://tracker.coreboot.org/trac/openbios/changeset/1149

Log:
video_common.c: create low-level video_fill_rect() function.

Switch fb8-erase-screen in display.fs over to use it.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/forth/device/display.fs
   trunk/openbios-devel/include/libopenbios/video.h
   trunk/openbios-devel/libopenbios/video_common.c
   trunk/openbios-devel/packages/video.c

Modified: trunk/openbios-devel/forth/device/display.fs
==============================================================================
--- trunk/openbios-devel/forth/device/display.fs	Sun Jun  9 14:25:22 2013	(r1148)
+++ trunk/openbios-devel/forth/device/display.fs	Sun Jun  9 14:25:25 2013	(r1149)
@@ -165,6 +165,7 @@
 
 \ bind to low-level C function later
 defer fb8-blitmask
+defer fb8-fillrect
 defer fb8-invertrect
 
 : fb8-line2addr ( line -- addr )
@@ -236,14 +237,13 @@
   ;
 
 : fb8-erase-screen ( -- )
-  frame-buffer-adr 
-  screen-height screen-width * 
   inverse-screen? if
     foreground-color
   else
     background-color
   then
-  fill
+  0 0 screen-width screen-height
+  fb8-fillrect
   ;
 
 : fb8-invert-screen ( -- )

Modified: trunk/openbios-devel/include/libopenbios/video.h
==============================================================================
--- trunk/openbios-devel/include/libopenbios/video.h	Sun Jun  9 14:25:22 2013	(r1148)
+++ trunk/openbios-devel/include/libopenbios/video.h	Sun Jun  9 14:25:25 2013	(r1149)
@@ -9,6 +9,7 @@
 void fill_rect(int col_ind, int x, int y, int w, int h);
 void video_mask_blit(void);
 void video_invert_rect(void);
+void video_fill_rect(void);
 
 typedef struct osi_fb_info {
     unsigned long mphys;

Modified: trunk/openbios-devel/libopenbios/video_common.c
==============================================================================
--- trunk/openbios-devel/libopenbios/video_common.c	Sun Jun  9 14:25:22 2013	(r1148)
+++ trunk/openbios-devel/libopenbios/video_common.c	Sun Jun  9 14:25:25 2013	(r1149)
@@ -339,6 +339,19 @@
     PUSH(len);
 }
 
+/* ( color_ind x y width height -- ) (?) */
+void
+video_fill_rect(void)
+{
+	int h = POP();
+	int w = POP();
+	int y = POP();
+	int x = POP();
+	int color_ind = POP();
+
+	fill_rect( color_ind, x, y, w, h );
+}
+
 void
 init_video( unsigned long fb, int width, int height, int depth, int rb )
 {
@@ -391,6 +404,9 @@
 	PUSH( pointer2cell(video_mask_blit) );
 	fword("is-noname-cfunc");
 	feval("to fb8-blitmask");
+	PUSH( pointer2cell(video_fill_rect) );
+	fword("is-noname-cfunc");
+	feval("to fb8-fillrect");
 	PUSH( pointer2cell(video_invert_rect) );
 	fword("is-noname-cfunc");
 	feval("to fb8-invertrect");

Modified: trunk/openbios-devel/packages/video.c
==============================================================================
--- trunk/openbios-devel/packages/video.c	Sun Jun  9 14:25:22 2013	(r1148)
+++ trunk/openbios-devel/packages/video.c	Sun Jun  9 14:25:25 2013	(r1149)
@@ -71,19 +71,6 @@
 	refresh_palette();
 }
 
-/* ( color_ind x y width height -- ) (?) */
-static void
-video_fill_rect( void )
-{
-	int h = POP();
-	int w = POP();
-	int y = POP();
-	int x = POP();
-	int color_ind = POP();
-
-	fill_rect( color_ind, x, y, w, h );
-}
-
 NODE_METHODS( video ) = {
 	{"dimensions",		video_dimensions	},
 	{"set-colors",		video_set_colors	},



More information about the OpenBIOS mailing list