From owner-p4-projects@FreeBSD.ORG Tue Nov 13 20:39:35 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE839A4C; Tue, 13 Nov 2012 20:39:34 +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 8FC16A4A for ; Tue, 13 Nov 2012 20:39:34 +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 76B828FC0C for ; Tue, 13 Nov 2012 20:39:34 +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 qADKdYs7039004 for ; Tue, 13 Nov 2012 20:39:34 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qADKdYJu039001 for perforce@freebsd.org; Tue, 13 Nov 2012 20:39:34 GMT (envelope-from brooks@freebsd.org) Date: Tue, 13 Nov 2012 20:39:34 GMT Message-Id: <201211132039.qADKdYJu039001@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 219771 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: Tue, 13 Nov 2012 20:39:35 -0000 http://p4web.freebsd.org/@@219771?ac=10 Change 219771 by brooks@brooks_zenith on 2012/11/13 20:39:24 Add fb_composite() so we can build up image buffers prior to rendering them. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.c#6 edit .. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.h#6 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.c#6 (text+ko) ==== @@ -369,6 +369,21 @@ pfbp[addr] = col; } +int +fb_composite(u_int32_t *dbuf, int dwidth, int dheight, int x, int y, + const u_int32_t *sbuf, int swidth, int sheight) +{ + int col, row; + + if (dwidth - x < swidth || dheight - y < sheight) + return (-1); + + for (row = 0; row < sheight; row++) + for (col = 0; col < swidth; col++) + dbuf[(y + row) * dwidth + (x + col)] = sbuf[row * swidth + col]; + + return (0); +} void fb_fill_region(u_int32_t colour, int x, int y, int w, int h) ==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.h#6 (text+ko) ==== @@ -135,6 +135,8 @@ void fb_fini(void); u_int32_t fb_colour(int r, int g, int b); 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_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);