private void maybeDoSingleThreadedWorkaround( Runnable eventDispatchThreadAction, Runnable invokeGLAction, boolean isReshape) { if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) { Threading.invokeOnOpenGLThread(eventDispatchThreadAction); } else { drawableHelper.invokeGL(pbufferDrawable, context, invokeGLAction, initAction); } }
public void destroy() { // FIXME: not calling event listeners .. see GLAutoDrawable spec if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) { Threading.invokeOnOpenGLThread(destroyAction); } else { destroyAction.run(); } }