[OpenBIOS] [commit] r1150 - trunk/openbios-devel/forth/device
repository service
svn at openbios.org
Sun Jun 9 14:25:28 CEST 2013
Author: mcayland
Date: Sun Jun 9 14:25:27 2013
New Revision: 1150
URL: http://tracker.coreboot.org/trac/openbios/changeset/1150
Log:
display.fs: optimise scrolling by copying/deleting multiple scanlines at once.
Change fb8-copy-line and fb8-clear-line so that they can operate on multiple
lines at once, renaming to fb8-copy-lines and fb8-clear-lines respectively.
Integrate these new functions into fb8-delete-lines so that they are used
when scrolling the display.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/display.fs
Modified: trunk/openbios-devel/forth/device/display.fs
==============================================================================
--- trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:25 2013 (r1149)
+++ trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:27 2013 (r1150)
@@ -175,17 +175,20 @@
window-left depth-bytes * +
;
-: fb8-copy-line ( from to -- )
- fb8-line2addr swap
- fb8-line2addr swap
- #columns char-width * depth-bytes * move
+: fb8-copy-lines ( count from to -- )
+ fb8-line2addr swap
+ fb8-line2addr swap
+ #columns char-width * depth-bytes *
+ 3 pick * move drop
;
-: fb8-clear-line ( line -- )
- fb8-line2addr
- #columns char-width * depth-bytes *
- background-color fill
-\ 0 fill
+: fb8-clear-lines ( count line -- )
+ background-color 0
+ 2 pick window-top +
+ #columns char-width *
+ 5 pick
+ fb8-fillrect
+ 2drop
;
: fb8-draw-character ( char -- )
@@ -269,20 +272,14 @@
: fb8-delete-lines ( n -- )
\ numcopy = ( #lines - ( line# + n )) * char-height
#lines over line# + - char-height *
-
- ( numcopy ) 0 ?do
- dup line# + char-height * i +
- line# char-height * i +
- fb8-copy-line
- loop
-
- #lines over - char-height *
- over char-height *
- 0 ?do
- dup i + fb8-clear-line
- loop
+ over line# + char-height *
+ line# char-height *
+ fb8-copy-lines
- 2drop
+ #lines over - char-height *
+ dup #lines char-height * swap - swap
+ fb8-clear-lines
+ drop
;
More information about the OpenBIOS
mailing list