PERFORCE change 76945 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri May 13 14:46:06 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=76945
Change 76945 by marcel at 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;
}
}
More information about the p4-projects
mailing list