From: fcambus Date: Sun, 21 Jul 2024 13:18:15 +0000 (+0000) Subject: Add optimized character rendering case for 6 pixels wide fonts in X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=649d1e2e4cf4aba4dbafaf3f0c9372016e366c62;p=openbsd Add optimized character rendering case for 6 pixels wide fonts in rasops32_putchar(). From jon (at) elytron (dot) openbsd (dot) amsterdam. --- 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];