summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-03-18 21:08:23 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-03-18 21:08:23 +0000
commit37eae24d5ca6ede0d4cf15623caf3472c0f90c67 (patch)
tree37d3b496b71c87622bb436626d45bcfff79e0ca0
parent317fb4ec919f727553f7cc03d1b3ff84a6d1cef8 (diff)
downloadnetsurf-37eae24d5ca6ede0d4cf15623caf3472c0f90c67.tar.gz
netsurf-37eae24d5ca6ede0d4cf15623caf3472c0f90c67.tar.bz2
add opaque switch to 16bpp plotters
svn path=/trunk/netsurf/; revision=6798
-rw-r--r--framebuffer/fb_16bpp_plotters.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/framebuffer/fb_16bpp_plotters.c b/framebuffer/fb_16bpp_plotters.c
index 975dd98cb..369683fde 100644
--- a/framebuffer/fb_16bpp_plotters.c
+++ b/framebuffer/fb_16bpp_plotters.c
@@ -489,19 +489,29 @@ static bool fb_16bpp_bitmap(int x, int y, int width, int height,
/* plot the image */
pvideo = fb_16bpp_get_xy_loc(x0, y0);
- for (yloop = yoff; yloop < height; yloop += bitmap->width) {
- for (xloop = 0; xloop < width; xloop++) {
- abpixel = pixel[yloop + xloop + xoff];
- if ((abpixel & 0xFF000000) != 0) {
- if ((abpixel & 0xFF000000) != 0xFF000000) {
- abpixel = fb_plotters_ablend(abpixel,
- fb_16bpp_to_colour(*(pvideo + xloop)));
- }
-
+ if (bitmap->opaque) {
+ for (yloop = yoff; yloop < height; yloop += bitmap->width) {
+ for (xloop = 0; xloop < width; xloop++) {
+ abpixel = pixel[yloop + xloop + xoff];
*(pvideo + xloop) = fb_colour_to_pixel(abpixel);
}
+ pvideo += (framebuffer->linelen >> 1);
+ }
+ } else {
+ for (yloop = yoff; yloop < height; yloop += bitmap->width) {
+ for (xloop = 0; xloop < width; xloop++) {
+ abpixel = pixel[yloop + xloop + xoff];
+ if ((abpixel & 0xFF000000) != 0) {
+ if ((abpixel & 0xFF000000) != 0xFF000000) {
+ abpixel = fb_plotters_ablend(abpixel,
+ fb_16bpp_to_colour(*(pvideo + xloop)));
+ }
+
+ *(pvideo + xloop) = fb_colour_to_pixel(abpixel);
+ }
+ }
+ pvideo += (framebuffer->linelen >> 1);
}
- pvideo += (framebuffer->linelen >> 1);
}
return true;