// part of SurfaceHolder.Callback
 @Override
 public void surfaceCreated(SurfaceHolder holder) {
   super.surfaceCreated(holder);
   if (PApplet.DEBUG) {
     System.out.println("surfaceCreated()");
   }
 }
 @Override
 public void surfaceCreated(SurfaceHolder holder) {
   boolean didHaveSurface = mHaveSurface;
   mHaveSurface = true;
   if (!didHaveSurface && mReadyToRenderCallback != null) {
     mReadyToRenderCallback.run();
     mReadyToRenderCallback = null;
   }
   super.surfaceCreated(holder);
 }