allowFirstFrame method

void allowFirstFrame ()

Called after deferFirstFrame to tell the framework that it is ok to send the first frame to the engine now.

For best performance, this method should only be called while the schedulerPhase is SchedulerPhase.idle.

This method may only be called once for each corresponding call to deferFirstFrame.

Implementation

void allowFirstFrame() {
  assert(_firstFrameDeferredCount > 0);
  _firstFrameDeferredCount -= 1;
  // Always schedule a warm up frame even if the deferral count is not down to
  // zero yet since the removal of a deferral may uncover new deferrals that
  // are lower in the widget tree.
  if (!_firstFrameSent)
    scheduleWarmUpFrame();
}