AWTGLCanvas: Synchronize paintGL() to avoid destroyContext while painting
This commit is contained in:
parent
8164a4a00a
commit
9f3de4fd81
|
@ -283,6 +283,7 @@ public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener,
|
|||
* be overridden to do GL operations.
|
||||
*/
|
||||
public final void paint(Graphics g) {
|
||||
synchronized (SYNC_LOCK) {
|
||||
try {
|
||||
if (peer_info == null) {
|
||||
this.peer_info = implementation.createPeerInfo(this, pixel_format);
|
||||
|
@ -322,6 +323,7 @@ public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener,
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* override update to avoid clearing
|
||||
|
|
Loading…
Reference in New Issue