r5281 tlsa - in /trunk/netsurf: amiga/bitmap.c beos/beos_bitmap.cpp gtk/gtk_bitmap.c riscos/bitmap.c

netsurf at semichrome.net netsurf at semichrome.net
Sun Sep 7 20:08:57 BST 2008


Author: tlsa
Date: Sun Sep  7 14:08:57 2008
New Revision: 5281

URL: http://source.netsurf-browser.org?rev=5281&view=rev
Log:
Fix Amiga bitmap_get_bpp to be same as others. (It's bytes per pixel, not bits.) Fix param comments for vbitmap.

Modified:
    trunk/netsurf/amiga/bitmap.c
    trunk/netsurf/beos/beos_bitmap.cpp
    trunk/netsurf/gtk/gtk_bitmap.c
    trunk/netsurf/riscos/bitmap.c

Modified: trunk/netsurf/amiga/bitmap.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/bitmap.c?rev=5281&r1=5280&r2=5281&view=diff
==============================================================================
--- trunk/netsurf/amiga/bitmap.c (original)
+++ trunk/netsurf/amiga/bitmap.c Sun Sep  7 14:08:57 2008
@@ -208,14 +208,17 @@
 	}
 }
 
-size_t bitmap_get_bpp(void *bitmap)
-{
-	if(bitmap)
-	{
-		return 32;
-	}
-	else
-	{
-		return 0;
-	}
-}
+
+/**
+ * Find the bytes per pixel of a bitmap
+ *
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
+ * \return bytes per pixel
+ */
+
+size_t bitmap_get_bpp(void *vbitmap)
+{
+	struct bitmap *bitmap = (struct bitmap *)vbitmap;
+	assert(bitmap);
+	return 4;
+}

Modified: trunk/netsurf/beos/beos_bitmap.cpp
URL: http://source.netsurf-browser.org/trunk/netsurf/beos/beos_bitmap.cpp?rev=5281&r1=5280&r2=5281&view=diff
==============================================================================
--- trunk/netsurf/beos/beos_bitmap.cpp (original)
+++ trunk/netsurf/beos/beos_bitmap.cpp Sun Sep  7 14:08:57 2008
@@ -151,8 +151,8 @@
 /**
  * Sets whether a bitmap should be plotted opaque
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
- * \param  opaque  whether the bitmap should be plotted opaque
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
+ * \param  opaque   whether the bitmap should be plotted opaque
  */
 void bitmap_set_opaque(void *vbitmap, bool opaque)
 {
@@ -166,8 +166,8 @@
 /**
  * Tests whether a bitmap has an opaque alpha channel
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
+ * \return whether  the bitmap is opaque
  */
 bool bitmap_test_opaque(void *vbitmap)
 {
@@ -181,7 +181,7 @@
 /**
  * Gets whether a bitmap should be plotted opaque
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  */
 bool bitmap_get_opaque(void *vbitmap)
 {
@@ -195,7 +195,7 @@
 /**
  * Return a pointer to the pixel data in a bitmap.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return pointer to the pixel buffer
  *
  * The pixel data is packed as BITMAP_FORMAT, possibly with padding at the end
@@ -213,7 +213,7 @@
 /**
  * Find the width of a pixel row in bytes.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return width of a pixel row in the bitmap
  */
 
@@ -228,7 +228,7 @@
 /**
  * Find the bytes per pixels of a bitmap.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return bytes per pixels of the bitmap
  */
 
@@ -253,7 +253,7 @@
 /**
  * Free a bitmap.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  */
 
 void bitmap_destroy(void *vbitmap)
@@ -270,9 +270,9 @@
 /**
  * Save a bitmap in the platform's native format.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
- * \param  path    pathname for file
- * \param  flags   modify the behaviour of the save
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
+ * \param  path     pathname for file
+ * \param  flags    modify the behaviour of the save
  * \return true on success, false on error and error reported
  */
 
@@ -297,14 +297,14 @@
 /**
  * The bitmap image has changed, so flush any persistant cache.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  */
 void bitmap_modified(void *vbitmap) {
 	struct bitmap *bitmap = (struct bitmap *)vbitmap;
 	// convert the shadow (ABGR) to into the primary bitmap
-	nsbeos_rgba_to_bgra(bitmap->shadow->Bits(), bitmap->primary->Bits(), 
-		bitmap->primary->Bounds().Width() + 1, 
-		bitmap->primary->Bounds().Height() + 1, 
+	nsbeos_rgba_to_bgra(bitmap->shadow->Bits(), bitmap->primary->Bits(),
+		bitmap->primary->Bounds().Width() + 1,
+		bitmap->primary->Bounds().Height() + 1,
 		bitmap->primary->BytesPerRow());
 	nsbeos_bitmap_free_pretiles(bitmap);
 }
@@ -313,7 +313,7 @@
 /**
  * The bitmap image can be suspended.
  *
- * \param  bitmap  	a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  	a bitmap, as returned by bitmap_create()
  * \param  private_word	a private word to be returned later
  * \param  suspend	the function to be called upon suspension
  * \param  resume	the function to be called when resuming

Modified: trunk/netsurf/gtk/gtk_bitmap.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/gtk_bitmap.c?rev=5281&r1=5280&r2=5281&view=diff
==============================================================================
--- trunk/netsurf/gtk/gtk_bitmap.c (original)
+++ trunk/netsurf/gtk/gtk_bitmap.c Sun Sep  7 14:08:57 2008
@@ -73,8 +73,8 @@
 /**
  * Sets whether a bitmap should be plotted opaque
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
- * \param  opaque  whether the bitmap should be plotted opaque
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
+ * \param  opaque   whether the bitmap should be plotted opaque
  */
 void bitmap_set_opaque(void *vbitmap, bool opaque)
 {
@@ -87,7 +87,7 @@
 /**
  * Tests whether a bitmap has an opaque alpha channel
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return whether the bitmap is opaque
  */
 bool bitmap_test_opaque(void *vbitmap)
@@ -102,7 +102,7 @@
 /**
  * Gets whether a bitmap should be plotted opaque
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  */
 bool bitmap_get_opaque(void *vbitmap)
 {
@@ -116,7 +116,7 @@
 /**
  * Return a pointer to the pixel data in a bitmap.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return pointer to the pixel buffer
  *
  * The pixel data is packed as BITMAP_FORMAT, possibly with padding at the end
@@ -134,7 +134,7 @@
 /**
  * Find the width of a pixel row in bytes.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return width of a pixel row in the bitmap
  */
 
@@ -149,7 +149,7 @@
 /**
  * Find the bytes per pixel of a bitmap
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return bytes per pixel
  */
 
@@ -174,7 +174,7 @@
 /**
  * Free a bitmap.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  */
 
 void bitmap_destroy(void *vbitmap)
@@ -190,9 +190,9 @@
 /**
  * Save a bitmap in the platform's native format.
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
- * \param  path    pathname for file
- * \param  flags   modify the behaviour of the save
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
+ * \param  path     pathname for file
+ * \param  flags    modify the behaviour of the save
  * \return true on success, false on error and error reported
  */
 

Modified: trunk/netsurf/riscos/bitmap.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/bitmap.c?rev=5281&r1=5280&r2=5281&view=diff
==============================================================================
--- trunk/netsurf/riscos/bitmap.c (original)
+++ trunk/netsurf/riscos/bitmap.c Sun Sep  7 14:08:57 2008
@@ -1179,7 +1179,7 @@
 /**
  * Find the bytes per pixel of a bitmap
  *
- * \param  bitmap  a bitmap, as returned by bitmap_create()
+ * \param  vbitmap  a bitmap, as returned by bitmap_create()
  * \return bytes per pixel
  */
 




More information about the netsurf-commits mailing list