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. From-SVN: r124251
This commit is contained in:
parent
9898e8391f
commit
a6ee54a636
4 changed files with 32 additions and 45 deletions
|
@ -544,6 +544,17 @@ public class ComponentGraphics extends CairoGraphics2D
|
|||
* methods ends up being called, we will deadlock. The lock is only reentrant
|
||||
* when called via our lock() method.
|
||||
*/
|
||||
|
||||
/* These methods are already locked in the superclass CairoGraphics2D
|
||||
* so they do not need to be overridden:
|
||||
*
|
||||
* public void disposeNative
|
||||
*
|
||||
* protected void cairoDrawGlyphVector
|
||||
*
|
||||
* protected void cairoSetFont
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected long init(long pointer)
|
||||
{
|
||||
|
@ -562,20 +573,6 @@ public class ComponentGraphics extends CairoGraphics2D
|
|||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeNative(long pointer)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock();
|
||||
super.disposeNative(pointer);
|
||||
}
|
||||
finally
|
||||
{
|
||||
unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawPixels(long pointer, int[] pixels, int w, int h,
|
||||
int stride, double[] i2u, double alpha,
|
||||
|
@ -727,36 +724,6 @@ public class ComponentGraphics extends CairoGraphics2D
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void cairoDrawGlyphVector(long pointer, GdkFontPeer font,
|
||||
float x, float y, int n,
|
||||
int[] codes, float[] positions)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock();
|
||||
super.cairoDrawGlyphVector(pointer, font, x, y, n, codes, positions);
|
||||
}
|
||||
finally
|
||||
{
|
||||
unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void cairoSetFont(long pointer, GdkFontPeer font)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock();
|
||||
super.cairoSetFont(pointer, font);
|
||||
}
|
||||
finally
|
||||
{
|
||||
unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void cairoRectangle(long pointer, double x, double y,
|
||||
double width, double height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue