[SLOF] [PATCH v2 2/2] fbuffer: Use a smaller cursor
Thomas Huth
thuth at redhat.com
Thu Jul 30 22:56:33 AEST 2015
Drawing the cursor in the frame buffer memory is a very, very
slow operation. So let's simply switch to a "underscore" cursor
instead of the full block cursor to save some precious cycles.
Signed-off-by: Thomas Huth <thuth at redhat.com>
---
slof/fs/fbuffer.fs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/slof/fs/fbuffer.fs b/slof/fs/fbuffer.fs
index 0128c07..bfe7ebf 100644
--- a/slof/fs/fbuffer.fs
+++ b/slof/fs/fbuffer.fs
@@ -98,7 +98,8 @@ CREATE bitmap-buffer 400 4 * allot
: fb8-toggle-cursor ( -- )
line# fb8-line2addr column# fb8-columns2bytes +
- char-height 0 ?DO
+ char-height 2 - screen-width screen-depth * * +
+ 2 0 ?DO
dup char-width screen-depth * invert-region
screen-width screen-depth * +
LOOP drop
--
1.8.3.1
More information about the SLOF
mailing list