diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-04-29 01:35:52 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-04-29 01:35:52 +0000 |
commit | ec9db1d6af76c053f5e1c746057554e0b0dbcc9b (patch) | |
tree | aee18fe5928493c31f36d99a609fac8052b66289 /image/mng.c | |
parent | 683892f9db54d0bdc2380dba12682df4f282b4b5 (diff) | |
download | netsurf-ec9db1d6af76c053f5e1c746057554e0b0dbcc9b.tar.gz netsurf-ec9db1d6af76c053f5e1c746057554e0b0dbcc9b.tar.bz2 |
[project @ 2005-04-29 01:35:52 by rjw]
Only initialise canvases if we need to.
svn path=/import/netsurf/; revision=1699
Diffstat (limited to 'image/mng.c')
-rw-r--r-- | image/mng.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/image/mng.c b/image/mng.c index c19873283..fadd6a3af 100644 --- a/image/mng.c +++ b/image/mng.c @@ -188,7 +188,7 @@ mng_bool nsmng_processheader(mng_handle mng, mng_uint32 width, mng_uint32 height LOG(("processing header (%p) %d, %d", c, width, height)); - c->bitmap = bitmap_create(width, height); + c->bitmap = bitmap_create(width, height, false); if (!c->bitmap) { msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); @@ -297,6 +297,9 @@ bool nsmng_convert(struct content *c, int width, int height) { /* Optimise the plotting of JNG/PNGs */ c->data.mng.opaque_test_pending = (c->type == CONTENT_PNG) || (c->type == CONTENT_JNG); + if (c->data.mng.opaque_test_pending) + bitmap_set_opaque(c->bitmap, false); + return true; } |