From 3d9a1198db571973e2760d6f27c771cbe31c844b Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Wed, 22 Feb 2006 01:58:19 +0000 Subject: [project @ 2006-02-22 01:58:19 by rjw] Reduce constant bitmap overhead per reference by moving to a flag word. Allow bitmaps to be reduced back to their raw data to free extra memory in a highly efficient manner. svn path=/import/netsurf/; revision=2089 --- image/jpeg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'image/jpeg.c') diff --git a/image/jpeg.c b/image/jpeg.c index 3efe698df..197a977b4 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -94,7 +94,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) width = cinfo.output_width; height = cinfo.output_height; - bitmap = bitmap_create(width, height, BITMAP_ALLOCATE_MEMORY); + bitmap = bitmap_create(width, height, BITMAP_NEW | BITMAP_OPAQUE); if (bitmap) pixels = bitmap_get_buffer(bitmap); if ((!bitmap) || (!pixels)) { @@ -107,7 +107,6 @@ bool nsjpeg_convert(struct content *c, int w, int h) warn_user("NoMemory", 0); return false; } - bitmap_set_opaque(bitmap, true); rowstride = bitmap_get_rowstride(bitmap); do { -- cgit v1.2.3