diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-12-16 14:12:04 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-12-16 14:12:04 +0000 |
commit | 8de8b083716558fe31ee71caa0d9e139b50da17c (patch) | |
tree | bb6c985d9c88e9fb458e3e9d681825665de936dd /image/mng.c | |
parent | 954f3eeaa5a52eb9e81be7995f01c8fcd8faa8f7 (diff) | |
download | netsurf-8de8b083716558fe31ee71caa0d9e139b50da17c.tar.gz netsurf-8de8b083716558fe31ee71caa0d9e139b50da17c.tar.bz2 |
[project @ 2004-12-16 14:12:04 by rjw]
Fix for bug when deleting an expanded tree node. JNG/PNG opacity is now tested during the first plot.
svn path=/import/netsurf/; revision=1405
Diffstat (limited to 'image/mng.c')
-rw-r--r-- | image/mng.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/image/mng.c b/image/mng.c index a223c7fff..a82017b1d 100644 --- a/image/mng.c +++ b/image/mng.c @@ -263,9 +263,7 @@ bool nsmng_convert(struct content *c, int width, int height) { /* Optimise the plotting of JNG/PNGs */ - if ((c->type == CONTENT_PNG) || (c->type == CONTENT_JNG)) { - bitmap_set_opaque(c->bitmap, bitmap_test_opaque(c->bitmap)); - } + c->data.mng.opaque_test_pending = (c->type == CONTENT_PNG) || (c->type == CONTENT_JNG); return true; } @@ -382,6 +380,9 @@ bool nsmng_redraw(struct content *c, int x, int y, float scale, unsigned long background_colour) { bool ret; + + if ((c->bitmap) && (c->data.mng.opaque_test_pending)) + bitmap_set_opaque(c->bitmap, bitmap_test_opaque(c->bitmap)); ret = plot.bitmap(x, y, width, height, c->bitmap, background_colour); |