Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)
Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (convert_to_format): Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||||
|
Add a fallback for unaligned source data for
|
||||||
|
FORMAT_ARGB_MASK. (#117217)
|
||||||
|
|
||||||
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Rework handling of REBUILD_PNGS,
|
* configure.in: Rework handling of REBUILD_PNGS,
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||||
|
Add a fallback for unaligned source data for
|
||||||
|
FORMAT_ARGB_MASK. (#117217)
|
||||||
|
|
||||||
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Rework handling of REBUILD_PNGS,
|
* configure.in: Rework handling of REBUILD_PNGS,
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||||
|
Add a fallback for unaligned source data for
|
||||||
|
FORMAT_ARGB_MASK. (#117217)
|
||||||
|
|
||||||
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Rework handling of REBUILD_PNGS,
|
* configure.in: Rework handling of REBUILD_PNGS,
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||||
|
Add a fallback for unaligned source data for
|
||||||
|
FORMAT_ARGB_MASK. (#117217)
|
||||||
|
|
||||||
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Rework handling of REBUILD_PNGS,
|
* configure.in: Rework handling of REBUILD_PNGS,
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||||
|
Add a fallback for unaligned source data for
|
||||||
|
FORMAT_ARGB_MASK. (#117217)
|
||||||
|
|
||||||
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* configure.in: Rework handling of REBUILD_PNGS,
|
* configure.in: Rework handling of REBUILD_PNGS,
|
||||||
|
|||||||
@ -1079,9 +1079,25 @@ convert_to_format (guchar *src_buf,
|
|||||||
}
|
}
|
||||||
case FORMAT_ARGB_MASK:
|
case FORMAT_ARGB_MASK:
|
||||||
{
|
{
|
||||||
guint *p = (guint *)(src_buf + i * src_rowstride);
|
guchar *row = src_buf + i * src_rowstride;
|
||||||
guint *q = (guint *)(dest_buf + i * dest_rowstride);
|
if (((gsize)row & 3) != 0)
|
||||||
guint *end = p + width;
|
{
|
||||||
|
guchar *p = row;
|
||||||
|
guint32 *q = (guint32 *)(dest_buf + i * dest_rowstride);
|
||||||
|
guchar *end = p + 4 * width;
|
||||||
|
|
||||||
|
while (p < end)
|
||||||
|
{
|
||||||
|
*q = (p[3] << 24) | (p[0] << 16) | (p[1] << 8) | p[2];
|
||||||
|
p += 4;
|
||||||
|
q++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
guint32 *p = (guint32 *)row;
|
||||||
|
guint32 *q = (guint32 *)(dest_buf + i * dest_rowstride);
|
||||||
|
guint32 *end = p + width;
|
||||||
|
|
||||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||||
if (dest_byteorder == GDK_LSB_FIRST)
|
if (dest_byteorder == GDK_LSB_FIRST)
|
||||||
@ -1136,6 +1152,7 @@ convert_to_format (guchar *src_buf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* G_BYTE_ORDER*/
|
#endif /* G_BYTE_ORDER*/
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FORMAT_ARGB:
|
case FORMAT_ARGB:
|
||||||
|
|||||||
Reference in New Issue
Block a user