private void moveToNext(){
  checkMainThread();
  scheduled.set(false);
  Bitmap next=pending.poll();
  if (next != null) {
    if (current != null && !finished.offer(current))     throw new RuntimeException("Could not add image to finished queue");
    current=next;
    invalidateSelf();
    ensureScheduled();
    frameAvailableSubject.onNext(null);
    fpsCounter.update();
  }
}

private void moveToNext ( ) { checkMainThread ( ) ; scheduled . set ( false ) ; Bitmap next = pending . poll ( ) ; if ( next != null ) { if ( current != null && ! finished . offer ( current ) ) throw new RuntimeException ( "Could not add image to finished queue" ) ; current = next ; invalidateSelf ( ) ; ensureScheduled ( ) ; frameAvailableSubject . onNext ( null ) ; fpsCounter . update ( ) ; } }
called to move to the next frame . this method will be called on the ui thread and must not block ! .
