As a footnote to this...
As I have to dispose and re-create the FrameBuffer each time, I thought I'd see if there were other ways to speed up the process.
I found that onSurfaceChanged() is actually being called twice, which I believe is an Android issue, and not mine.
Anyway, I've implemented a counter that is reset in the GLSurfaceView.onResume() method, so now when onSurfaceChanged() has been called once it isn't called again. This is probably shaved 1/3 off the restart time.
@Override
public void onSurfaceChanged(GL10 ignore, int width, int height) {
if (SURFACE_RESTART_COUNT > 0) return;
SURFACE_RESTART_COUNT++;
Globals.SCREEN_WIDTH = width;
Globals.SCREEN_HEIGHT = height;
if (frameBuffer!=null) frameBuffer.dispose();
frameBuffer = new FrameBuffer(Globals.SCREEN_WIDTH, Globals.SCREEN_HEIGHT);
Log.i(LOG_TAG,"Frame buffer set - w: "+ Globals.SCREEN_WIDTH + ", h: "+Globals.SCREEN_HEIGHT );
}
Cheers.