summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-08-07 21:16:49 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-08-07 21:16:49 +0000
commitd197e03bf2329eabfbad98028760b9d792b98246 (patch)
tree6be8e96499c45ab2e91b5736f94a41b3e5fbe61d /image
parent3cbbdeb91cb25c8be5f83674778395c42988d542 (diff)
downloadnetsurf-d197e03bf2329eabfbad98028760b9d792b98246.tar.gz
netsurf-d197e03bf2329eabfbad98028760b9d792b98246.tar.bz2
Support new libnsgif by adding bitmap flag BITMAP_ABGR.
This tells big endian systems that the data is in ABGR instead of RGBA. It should be ignored on little endian systems! Add support in Amiga platform code. -> All platform code that could be compiled for big endian systems will need to be updated to recognise BITMAP_ABGR. This includes GTK and Framebuffer frontends. Both BITMAP_ABGR *and* the endianness of the host will most likely need to be checked and the allocated bitmap format and/or bitmap plotter changed to handle ABGR component order. svn path=/trunk/netsurf/; revision=9108
Diffstat (limited to 'image')
-rw-r--r--image/bitmap.h5
-rw-r--r--image/gif.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/image/bitmap.h b/image/bitmap.h
index 4a99de17e..61760decf 100644
--- a/image/bitmap.h
+++ b/image/bitmap.h
@@ -38,6 +38,11 @@
#define BITMAP_CLEAR_MEMORY (1 << 3) /** memory should be wiped */
#define BITMAP_SUSPENDED (1 << 4) /** currently suspended */
#define BITMAP_READY (1 << 5) /** fully initialised */
+#define BITMAP_ABGR (1 << 6) /** This bitmap is in ABGR format on
+ big-endian platforms (if not set,
+ bitmap is RGBA). This flag has
+ no relevance on LE platforms,
+ where data is always ABGR */
#define BITMAP_SAVE_FULL_ALPHA (1 << 0) /** save with full alpha channel (if not opaque) */
diff --git a/image/gif.c b/image/gif.c
index 62d73f0b0..5f8e6c525 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -338,7 +338,7 @@ void nsgif_animate(void *p)
*/
void *nsgif_bitmap_create(int width, int height)
{
- return bitmap_create(width, height, BITMAP_NEW);
+ return bitmap_create(width, height, BITMAP_NEW | BITMAP_ABGR);
}
#endif