Date: Tue, 13 Nov 2012 20:39:34 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219771 for review Message-ID: <201211132039.qADKdYJu039001@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211132039.qADKdYJu039001>