f-spot r3814 - in trunk: . libfspot src



Author: sdelcroix
Date: Fri Apr 11 14:54:53 2008
New Revision: 3814
URL: http://svn.gnome.org/viewvc/f-spot?rev=3814&view=rev

Log:
2008-04-11  Stephane Delcroix  <sdelcroix novell com>

	* src/Texture.cs:
	* libfspot/f-pixbuf-utils.c: two patches from Benjamin Berg
	to fix endianness issues on PPC. Fixes bgo #512842 and #471497


Modified:
   trunk/ChangeLog
   trunk/libfspot/f-pixbuf-utils.c
   trunk/src/Texture.cs

Modified: trunk/libfspot/f-pixbuf-utils.c
==============================================================================
--- trunk/libfspot/f-pixbuf-utils.c	(original)
+++ trunk/libfspot/f-pixbuf-utils.c	Fri Apr 11 14:54:53 2008
@@ -327,16 +327,15 @@
 
       while (p < end)
 	{
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
 	  tmp = p[0];
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
 	  p[0] = p[2];
 	  p[2] = tmp;
 #else	  
-	  tmp = p[0];
-	  p[0] = p[3];
-	  p[3] = p[2];
-	  p[2] = p[1];
-	  p[1] = tmp;
+	  p[0] = p[1];
+	  p[1] = p[2];
+	  p[2] = p[3];
+	  p[3] = tmp;
 #endif
 	  p += 4;
 	}

Modified: trunk/src/Texture.cs
==============================================================================
--- trunk/src/Texture.cs	(original)
+++ trunk/src/Texture.cs	Fri Apr 11 14:54:53 2008
@@ -142,11 +142,11 @@
 				Glu.gluScaleImage (Gl.GL_BGRA,
 						  width,
 						  height,
-						  Gl.GL_UNSIGNED_BYTE,
+						  Gl.GL_UNSIGNED_INT_8_8_8_8_REV,
 						  pixels,
 						  swidth,
 						  sheight,
-						  Gl.GL_UNSIGNED_BYTE,
+						  Gl.GL_UNSIGNED_INT_8_8_8_8_REV,
 						  tmp);
 				pixels = tmp;
 				width = swidth;
@@ -160,7 +160,7 @@
 					 height,
 					 0,
 					 Gl.GL_BGRA,
-					 Gl.GL_UNSIGNED_BYTE,
+					 Gl.GL_UNSIGNED_INT_8_8_8_8_REV,
 					 pixels);
 			
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]