diff options
author | Frederic Cambus <fcambus@cvs.openbsd.org> | 2024-07-21 13:18:16 +0000 |
---|---|---|
committer | Frederic Cambus <fcambus@cvs.openbsd.org> | 2024-07-21 13:18:16 +0000 |
commit | 210db4d5e3fd00c7c9b63e02f51f0799ae3c6ed1 (patch) | |
tree | 931c5239adece005c3ed65fd576576c0ba0e3b30 /sys/dev/rasops | |
parent | f3b534ba8cdb7e3d424fd7ef4a84eb9319c2cc1b (diff) |
Add optimized character rendering case for 6 pixels wide fonts in
rasops32_putchar().
From jon (at) elytron (dot) openbsd (dot) amsterdam.
Diffstat (limited to 'sys/dev/rasops')
-rw-r--r-- | sys/dev/rasops/rasops32.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/rasops/rasops32.c b/sys/dev/rasops/rasops32.c index 6040a4a23c9..ec189be00b1 100644 --- a/sys/dev/rasops/rasops32.c +++ b/sys/dev/rasops/rasops32.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops32.c,v 1.13 2023/01/18 11:08:49 nicm Exp $ */ +/* $OpenBSD: rasops32.c,v 1.14 2024/07/21 13:18:15 fcambus Exp $ */ /* $NetBSD: rasops32.c,v 1.7 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -112,6 +112,17 @@ rasops32_putchar(void *cookie, int row, int col, u_int uc, uint32_t attr) /* double-pixel special cases for the common widths */ switch (width) { + case 6: + while (height--) { + fb = fr[0]; + rp[0] = u.q[fb >> 6]; + rp[1] = u.q[(fb >> 4) & 3]; + rp[2] = u.q[(fb >> 2) & 3]; + rp += step; + fr += 1; + } + break; + case 8: while (height--) { fb = fr[0]; |