Date: Fri, 13 May 2005 21:46:05 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 76945 for review Message-ID: <200505132146.j4DLk51N018084@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=76945 Change 76945 by marcel@marcel_nfs on 2005/05/13 21:45:57 o Cache vc->vtc_con_width in local variable width. This improves readability and makes sure the compiler knows the value is not changed across function calls. The latter helps optimizations. o s/BITBLT_CLRTOFB/BITBLT_CTOFB/ o Fix clearing the last line (missing width product). Affected files ... .. //depot/projects/tty/sys/dev/vtc/vtc_con.c#5 edit Differences ... ==== //depot/projects/tty/sys/dev/vtc/vtc_con.c#5 (text+ko) ==== @@ -95,6 +95,7 @@ 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00 }; struct vtc_conout *vc = cp->cn_arg; + int width = vc->vtc_con_width; switch (c) { case 0x0a: @@ -103,7 +104,7 @@ break; default: vc->vtc_con_bitblt(vc, BITBLT_H1TOFB, (uintptr_t)bitmap, - vc->vtc_con_width * row * 19 + col * 8, 8, 19, 0, 7); + width * row * 19 + col * 8, 8, 19, 0, 7); col++; break; } @@ -112,10 +113,10 @@ row++; } if (row >= 24) { - vc->vtc_con_bitblt(vc, BITBLT_FBTOFB, vc->vtc_con_width * 19, - 0, vc->vtc_con_width, 23 * 19); - vc->vtc_con_bitblt(vc, BITBLT_CLRTOFB, 0, 23 * 19, - vc->vtc_con_width, 19); + vc->vtc_con_bitblt(vc, BITBLT_FBTOFB, width * 19, 0, width, + 23 * 19); + vc->vtc_con_bitblt(vc, BITBLT_CTOFB, 0, width * 23 * 19, width, + 19); row = 23; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505132146.j4DLk51N018084>