summaryrefslogtreecommitdiff
path: root/xserver/glamor/glamor_glyphblt.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/glamor/glamor_glyphblt.c')
-rw-r--r--xserver/glamor/glamor_glyphblt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xserver/glamor/glamor_glyphblt.c b/xserver/glamor/glamor_glyphblt.c
index 78315ea9b..2e01cdd19 100644
--- a/xserver/glamor/glamor_glyphblt.c
+++ b/xserver/glamor/glamor_glyphblt.c
@@ -101,7 +101,11 @@ glamor_poly_glyph_blt_gl(DrawablePtr drawable, GCPtr gc,
int pt_x_i = glyph_x + xx;
int pt_y_i = glyph_y + yy;
+#if BITMAP_BIT_ORDER == MSBFirst
+ if (!(*glyph & (128 >> (xx & 7))))
+#else
if (!(*glyph & (1 << (xx & 7))))
+#endif
continue;
if (!RegionContainsPoint(clip, pt_x_i, pt_y_i, NULL))
@@ -208,7 +212,11 @@ glamor_push_pixels_gl(GCPtr gc, PixmapPtr bitmap,
for (yy = 0; yy < h; yy++) {
uint8_t *bitmap_row = bitmap_data + yy * bitmap_stride;
for (xx = 0; xx < w; xx++) {
+#if BITMAP_BIT_ORDER == MSBFirst
+ if (bitmap_row[xx / 8] & (128 >> xx % 8) &&
+#else
if (bitmap_row[xx / 8] & (1 << xx % 8) &&
+#endif
RegionContainsPoint(clip,
x + xx,
y + yy,