Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/8b7bbb415828c72ba1719d7ed210772ff7cc4dc8
...commit
http://git.netsurf-browser.org/netsurf.git/commit/8b7bbb415828c72ba1719d7ed210772ff7cc4dc8
...tree
http://git.netsurf-browser.org/netsurf.git/tree/8b7bbb415828c72ba1719d7ed210772ff7cc4dc8
The branch, master has been updated
via 8b7bbb415828c72ba1719d7ed210772ff7cc4dc8 (commit)
from 1577d000501894217f59da389f9c08f2d8566f42 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=8b7bbb415828c72ba1719d7ed210772ff7cc4dc8
commit 8b7bbb415828c72ba1719d7ed210772ff7cc4dc8
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Bitmap: Remove misleading format documentation.
diff --git a/include/netsurf/bitmap.h b/include/netsurf/bitmap.h
index 25923da..10e9a07 100644
--- a/include/netsurf/bitmap.h
+++ b/include/netsurf/bitmap.h
@@ -20,35 +20,13 @@
* \file
* Generic bitmap handling interface.
*
- * This interface wraps the native platform-specific image format, so that
- * portable image convertors can be written.
+ * This interface wraps the native platform-specific image format.
*
- * Bitmaps are required to be 32bpp with components in the order RR GG BB AA.
+ * Bitmaps are required to be 32bpp with 8-bit components. The components are
+ * red, green, blue, and alpha, in client specified order.
*
- * For example, an opaque 1x1 pixel image would yield the following bitmap
- * data:
- *
- * > Red : 0xff 0x00 0x00 0x00
- * > Green: 0x00 0xff 0x00 0x00
- * > Blue : 0x00 0x00 0xff 0x00
- *
- * Any attempt to read pixels by casting bitmap data to uint32_t or similar
- * will need to cater for the order of bytes in a word being different on
- * big and little endian systems. To avoid confusion, it is recommended
- * that pixel data is loaded as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * // red green blue alpha
- * return bmp[0] | (bmp[1] << 8) | (bmp[2] << 16) | (bmp[3] << 24);
- * }
- *
- * and *not* as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * return *((uint32_t *) bmp);
- * }
+ * The component order may be set in the front ends by calling
+ * \ref bitmap_set_format().
*/
#ifndef _NETSURF_BITMAP_H_
-----------------------------------------------------------------------
Summary of changes:
include/netsurf/bitmap.h | 32 +++++---------------------------
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/include/netsurf/bitmap.h b/include/netsurf/bitmap.h
index 25923da..10e9a07 100644
--- a/include/netsurf/bitmap.h
+++ b/include/netsurf/bitmap.h
@@ -20,35 +20,13 @@
* \file
* Generic bitmap handling interface.
*
- * This interface wraps the native platform-specific image format, so that
- * portable image convertors can be written.
+ * This interface wraps the native platform-specific image format.
*
- * Bitmaps are required to be 32bpp with components in the order RR GG BB AA.
+ * Bitmaps are required to be 32bpp with 8-bit components. The components are
+ * red, green, blue, and alpha, in client specified order.
*
- * For example, an opaque 1x1 pixel image would yield the following bitmap
- * data:
- *
- * > Red : 0xff 0x00 0x00 0x00
- * > Green: 0x00 0xff 0x00 0x00
- * > Blue : 0x00 0x00 0xff 0x00
- *
- * Any attempt to read pixels by casting bitmap data to uint32_t or similar
- * will need to cater for the order of bytes in a word being different on
- * big and little endian systems. To avoid confusion, it is recommended
- * that pixel data is loaded as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * // red green blue alpha
- * return bmp[0] | (bmp[1] << 8) | (bmp[2] << 16) | (bmp[3] << 24);
- * }
- *
- * and *not* as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * return *((uint32_t *) bmp);
- * }
+ * The component order may be set in the front ends by calling
+ * \ref bitmap_set_format().
*/
#ifndef _NETSURF_BITMAP_H_
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]