Fix up selection of conversion functions for MSB machines:

2005-06-24  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
        conversion functions for MSB machines: convert_0888[_br]
        now work on bytes so are endian independent.
        (Reported by David Zeuthen)
This commit is contained in:
Owen Taylor 2005-06-24 15:06:29 +00:00 committed by Owen Taylor
parent 47ab9b2dc9
commit dd19f542db
4 changed files with 27 additions and 16 deletions

View File

@ -1,3 +1,10 @@
2005-06-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
conversion functions for MSB machines: convert_0888[_br]
now work on bytes so are endian independent.
(Reported by David Zeuthen)
2005-06-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't

View File

@ -1,3 +1,10 @@
2005-06-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
conversion functions for MSB machines: convert_0888[_br]
now work on bytes so are endian independent.
(Reported by David Zeuthen)
2005-06-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't

View File

@ -1,3 +1,10 @@
2005-06-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
conversion functions for MSB machines: convert_0888[_br]
now work on bytes so are endian independent.
(Reported by David Zeuthen)
2005-06-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't

View File

@ -3135,17 +3135,17 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
((mask_rgb && byte_order == GDK_MSB_FIRST) ||
(mask_bgr && byte_order == GDK_LSB_FIRST)))
conv = gdk_rgb_convert_888_msb;
#if G_BYTE_ORDER == G_BIG_ENDIAN
else if (bpp == 32 &&
(depth == 24 || depth == 32) &&
vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_rgb && byte_order == GDK_LSB_FIRST))
conv = gdk_rgb_convert_0888_br;
else if (bpp == 32 &&
(depth == 24 || depth == 32) &&
vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_rgb && byte_order == GDK_MSB_FIRST))
conv = gdk_rgb_convert_0888_br;
else if (bpp == 32 &&
(depth == 24 || depth == 32) &&
vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_rgb && byte_order == GDK_LSB_FIRST))
conv = gdk_rgb_convert_0888;
#if G_BYTE_ORDER == G_BIG_ENDIAN
else if (bpp == 32 && depth == 24 && vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_bgr && byte_order == GDK_MSB_FIRST))
conv = gdk_rgb_convert_8880_br;
@ -3156,16 +3156,6 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
(mask_rgb && byte_order == GDK_MSB_FIRST))
conv = gdk_rgb_convert_8880_br;
#else
else if (bpp == 32 &&
(depth == 24 || depth == 32) &&
vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_rgb && byte_order == GDK_MSB_FIRST))
conv = gdk_rgb_convert_0888_br;
else if (bpp == 32 &&
(depth == 24 || depth == 32) &&
vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_rgb && byte_order == GDK_LSB_FIRST))
conv = gdk_rgb_convert_0888;
else if (bpp == 32 && depth == 24 && vtype == GDK_VISUAL_TRUE_COLOR &&
(mask_bgr && byte_order == GDK_LSB_FIRST))
conv = gdk_rgb_convert_8880_br;