[Xcb] [PATCH 2/2] Fix xcb_image_convert slow path
Peter Harris
peter.harris at hummingbird.com
Wed Oct 1 16:37:46 PDT 2008
If the image bit order matches the image byte order, then the actual
byte that a given bit falls into will be proportional to the bit number.
Otherwise, the byte is inversely proportional.
Signed-off-by: Peter Harris <peter.harris at hummingbird.com>
---
image/xcb_image.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/image/xcb_image.c b/image/xcb_image.c
index 6fae30a..2388948 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -532,7 +532,7 @@ static uint32_t
xy_image_byte (xcb_image_t *image, uint32_t x)
{
x >>= 3;
- if (image->byte_order == XCB_IMAGE_ORDER_LSB_FIRST)
+ if (image->byte_order == image->bit_order)
return x;
switch (image->unit) {
default:
--
1.5.6.5
More information about the Xcb
mailing list