summaryrefslogtreecommitdiff
path: root/native/jni
diff options
context:
space:
mode:
authorSven de Marothy <sven@physto.se>2006-08-06 21:00:54 +0000
committerSven de Marothy <sven@physto.se>2006-08-06 21:00:54 +0000
commitea80b2e7fd407a9b5e75f0d2ada18e27faabb66c (patch)
treed1237e7340d27bbc34a382cc6c795749317bfd88 /native/jni
parent28608c659d5008732362bbc41f120879a11b42de (diff)
downloadclasspath-ea80b2e7fd407a9b5e75f0d2ada18e27faabb66c.tar.gz
2006-08-06 Sven de Marothy <sven@physto.se>
* gnu/java/awt/peer/gtk/CairoGraphics2D.java (drawGlyphVector): Synchronize against font object when drawing. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c (nativeDrawGlyphVector): Use pango locking when drawing. (install_font_peer): Use pango locking when creating the cairo face.
Diffstat (limited to 'native/jni')
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
index 0670403dd..45cf4fbda 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
@@ -315,7 +315,9 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector
(*env)->ReleaseFloatArrayElements (env, java_positions, native_positions, 0);
(*env)->ReleaseIntArrayElements (env, java_codes, native_codes, 0);
+ pango_fc_font_lock_face( (PangoFcFont *)pfont->font );
cairo_show_glyphs (gr->cr, glyphs, n);
+ pango_fc_font_unlock_face( (PangoFcFont *)pfont->font );
g_free(glyphs);
}
@@ -761,18 +763,19 @@ install_font_peer(cairo_t *cr,
if (pfont->graphics_resource == NULL)
{
- face = pango_ft2_font_get_face (pfont->font);
+ face = pango_fc_font_lock_face( (PangoFcFont *)pfont->font );
g_assert (face != NULL);
ft = cairo_ft_font_face_create_for_ft_face (face, 0);
g_assert (ft != NULL);
cairo_set_font_face (cr, ft);
- cairo_font_face_destroy (ft);
+ /* cairo_font_face_destroy (ft);*/
cairo_set_font_size (cr,
(pango_font_description_get_size (pfont->desc) /
(double)PANGO_SCALE));
ft = cairo_get_font_face (cr);
+ pango_fc_font_unlock_face( (PangoFcFont *)pfont->font );
pfont->graphics_resource = ft;
}
else