evince r3587 - in branches/gnome-2-26: . backend/dvi



Author: bberg
Date: Wed Apr  8 22:38:09 2009
New Revision: 3587
URL: http://svn.gnome.org/viewvc/evince?rev=3587&view=rev

Log:
2009-04-09  Benjamin Berg  <benjamin sipsolutions net>

	* backend/dvi/cairo-device.c: (dvi_cairo_put_pixel):
	Fix output on big endian machines. Fixes bug #578433.


Modified:
   branches/gnome-2-26/ChangeLog
   branches/gnome-2-26/backend/dvi/cairo-device.c

Modified: branches/gnome-2-26/backend/dvi/cairo-device.c
==============================================================================
--- branches/gnome-2-26/backend/dvi/cairo-device.c	(original)
+++ branches/gnome-2-26/backend/dvi/cairo-device.c	Wed Apr  8 22:38:09 2009
@@ -247,16 +247,14 @@
 {
 	cairo_surface_t *surface;
 	gint             rowstride;
-	guchar          *p;
+	guint32         *p;
 
 	surface = (cairo_surface_t *) image;
 
 	rowstride = cairo_image_surface_get_stride (surface);
-	p = cairo_image_surface_get_data (surface) + y * rowstride + x * 4;
+	p = (guint32*) (cairo_image_surface_get_data (surface) + y * rowstride + x * 4);
 
-	p[2] = (color >> 16) & 0xff;
-	p[1] = (color >> 8) & 0xff;
-	p[0] = (color >> 0) & 0xff;
+	*p = color;
 }
 
 static void



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