Commit 335ab266 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

Fix fringe bitmap initialization for cairo.

* fringe.c (init_fringe_bitmap) [USE_CAIRO]: Adjust bitmap data for
cairo image surface.

* xterm.c (x_cr_define_fringe_bitmap): Call cairo_surface_mark_dirty.
parent dddcc0e7
2015-02-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* fringe.c (init_fringe_bitmap) [USE_CAIRO]: Adjust bitmap data for
cairo image surface.
* xterm.c (x_cr_define_fringe_bitmap): Call cairo_surface_mark_dirty.
2015-02-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Jan Djärv <jan.h.d@swipnet.se>
......
......@@ -1405,6 +1405,21 @@ init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p)
unsigned short *bits = fb->bits;
int j;
#ifdef USE_CAIRO
for (j = 0; j < fb->height; j++)
{
unsigned short b = *bits;
#ifdef WORDS_BIGENDIAN
*bits++ = (b << (16 - fb->width));
#else
b = (unsigned short)((swap_nibble[b & 0xf] << 12)
| (swap_nibble[(b>>4) & 0xf] << 8)
| (swap_nibble[(b>>8) & 0xf] << 4)
| (swap_nibble[(b>>12) & 0xf]));
*bits++ = (b >> (16 - fb->width));
#endif
}
#else /* not USE_CAIRO */
if (fb->width <= 8)
{
unsigned char *cbits = (unsigned char *)fb->bits;
......@@ -1433,6 +1448,7 @@ init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p)
*bits++ = b;
}
}
#endif /* not USE_CAIRO */
#endif /* HAVE_X_WINDOWS */
}
......
......@@ -518,6 +518,7 @@ x_cr_define_fringe_bitmap (which, bits, h, wd)
data += stride;
}
cairo_surface_mark_dirty (surface);
pattern = cairo_pattern_create_for_surface (surface);
cairo_surface_destroy (surface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment