diff options
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/ftcrfont.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fea9e379d73..d2cb70e2d08 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2015-02-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * ftcrfont.c (ftcrfont_draw): Don't flush when drawing to screen. + 2015-02-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * xterm.c [USE_CAIRO]: Include math.h. diff --git a/src/ftcrfont.c b/src/ftcrfont.c index d60c1202b9d..fc4e6dae873 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -246,6 +246,7 @@ ftcrfont_draw (struct glyph_string *s, cairo_t *cr; cairo_glyph_t *glyphs; cairo_surface_t *surface; + cairo_surface_type_t surface_type; int len = to - from; int i; @@ -282,7 +283,12 @@ ftcrfont_draw (struct glyph_string *s, FT_Activate_Size (ftcrfont_info->ft_size_draw); cairo_show_glyphs (cr, glyphs, len); surface = cairo_get_target (cr); - if (cairo_surface_get_type (surface) != CAIRO_SURFACE_TYPE_XLIB) + /* XXX: It used to be necessary to flush when exporting. It might + be the case that this is no longer necessary. */ + surface_type = cairo_surface_get_type (surface); + if (surface_type != CAIRO_SURFACE_TYPE_XLIB + && (surface_type != CAIRO_SURFACE_TYPE_IMAGE + || cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32)) cairo_surface_flush (surface); x_end_cr_clip (f); |