code: function __flush_frames() {
  
          var rendered_frames = 0;
  
          // Draw all pending frames, if ready
          while (rendered_frames < frames.length) {
  
              var frame = frames[rendered_frames];
              if (!frame.isReady())
                  break;
  
              frame.flush();
              rendered_frames++;
  
          } 
  
          // Remove rendered frames from array
          frames.splice(0, rendered_frames);
  
      }
docs: Flushes all pending frames.
  @private