From owner-p4-projects@FreeBSD.ORG Thu Nov 15 01:24:30 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C9FC072E; Thu, 15 Nov 2012 01:24:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D5EE72C for ; Thu, 15 Nov 2012 01:24:29 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 62FD38FC0C for ; Thu, 15 Nov 2012 01:24:29 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.5/8.14.5) with ESMTP id qAF1OTbk030101 for ; Thu, 15 Nov 2012 01:24:29 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qAF1OT7j030098 for perforce@freebsd.org; Thu, 15 Nov 2012 01:24:29 GMT (envelope-from brooks@freebsd.org) Date: Thu, 15 Nov 2012 01:24:29 GMT Message-Id: <201211150124.qAF1OT7j030098@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 219789 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 01:24:30 -0000 http://p4web.freebsd.org/@@219789?ac=10 Change 219789 by brooks@brooks_zenith on 2012/11/15 01:24:13 Add a new fb_rectangle primative to make it easy to draw boxes around things. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.c#7 edit .. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.h#7 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.c#7 (text+ko) ==== @@ -386,6 +386,24 @@ } void +fb_rectangle(u_int32_t color, int thickness, int x, int y, int w, int h) +{ + int col, row; + + for (row = 0; row < h; row++) { + if (row < thickness || row >= h - thickness) + for (col = 0; col < w; col++) + pfbp[(y + row) * fb_width + (x + col)] = color; + else { + for (col = 0; col < thickness; col++) { + pfbp[(y + row) * fb_width + (x + col)] = color; + pfbp[(y + row) * fb_width + (x + col + w - thickness)] = color; + } + } + } +} + +void fb_fill_region(u_int32_t colour, int x, int y, int w, int h) { int col, row; ==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.h#7 (text+ko) ==== @@ -137,6 +137,8 @@ void fb_putpixel(int px, int py, int colour); int fb_composite(u_int32_t *dbuf, int dwidth, int dheight, int x, int y, const u_int32_t *sbuf, int swidth, int sheight); +void fb_rectangle(u_int32_t color, int thickness, int x, int y, int + width, int height); void fb_fill(int col); void fb_fill_region(u_int32_t colour, int x, int y, int w, int h); void fb_fill_buf(u_int32_t *buf, u_int32_t color, int width, int height);