diff options
author | fitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-28 01:58:23 +0000 |
---|---|---|
committer | fitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-28 01:58:23 +0000 |
commit | 187386f3c3bb1259b23d25bbbc98210120eff7cc (patch) | |
tree | bd7fc58030fed2d59ec96166c27e6a9cfcd46c71 /libjava/classpath/native/jni | |
parent | a3779673d67c060df013c918ed022e5b828501c3 (diff) | |
download | gcc-187386f3c3bb1259b23d25bbbc98210120eff7cc.tar.gz |
2007-04-04 Francis Kung <fkung@redhat.com>
* gnu/java/awt/peer/gtk/ComponentGraphics.java
(cairoDrawGlyphVector): Removed method.
(cairoSetFont): Removed method.
(disposeNative): Removed method.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector): Added
locking.
(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont): Added locking.
(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_disposeNative): Added locking.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/native/jni')
-rw-r--r-- | libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c index b183a1bac77..2da68e0e4e0 100644 --- a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c +++ b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c @@ -87,7 +87,11 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_disposeNative return; if (gr->cr) - cairo_destroy (gr->cr); + { + gdk_threads_enter(); + cairo_destroy (gr->cr); + gdk_threads_leave(); + } if (gr->pattern) cairo_pattern_destroy (gr->pattern); @@ -343,9 +347,11 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector (*env)->ReleaseFloatArrayElements (env, java_positions, native_positions, 0); (*env)->ReleaseIntArrayElements (env, java_codes, native_codes, 0); + gdk_threads_enter (); pango_fc_font_lock_face( (PangoFcFont *)pfont->font ); cairo_show_glyphs (gr->cr, glyphs, n); pango_fc_font_unlock_face( (PangoFcFont *)pfont->font ); + gdk_threads_leave (); g_free(glyphs); } @@ -367,6 +373,7 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, font); g_assert (pfont != NULL); + gdk_threads_enter(); face = pango_fc_font_lock_face( (PangoFcFont *)pfont->font ); g_assert (face != NULL); @@ -380,6 +387,7 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoSetFont cairo_font_face_destroy (ft); pango_fc_font_unlock_face((PangoFcFont *)pfont->font); + gdk_threads_leave(); } JNIEXPORT void JNICALL |