From owner-p4-projects@FreeBSD.ORG Fri May 13 21:46:06 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 012A216A4D1; Fri, 13 May 2005 21:46:06 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9CAF16A4CE for ; Fri, 13 May 2005 21:46:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6E4843D7C for ; Fri, 13 May 2005 21:46:05 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4DLk5Tr018087 for ; Fri, 13 May 2005 21:46:05 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4DLk51N018084 for perforce@freebsd.org; Fri, 13 May 2005 21:46:05 GMT (envelope-from marcel@freebsd.org) Date: Fri, 13 May 2005 21:46:05 GMT Message-Id: <200505132146.j4DLk51N018084@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 76945 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 21:46:06 -0000 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; } }