summaryrefslogtreecommitdiff
path: root/gdk/gdkcairo.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/gdkcairo.c')
-rw-r--r--gdk/gdkcairo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index 2ae8b09459..ea58c428f9 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -427,7 +427,11 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
gint x0 = x;
while (x < extents.width)
{
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
if (((data[x / 8] >> (x%8)) & 1) == 0)
+#else
+ if (((data[x / 8] >> (7-(x%8))) & 1) == 0)
+#endif
/* This pixel is "transparent"*/
break;
x++;