compositeFrame method Null safety

void compositeFrame()

Uploads the composited layer tree to the engine.

Actually causes the output of the rendering pipeline to appear on screen.

Implementation

void compositeFrame() {
  if (!kReleaseMode) {
    Timeline.startSync('COMPOSITING');
  }
  try {
    final ui.SceneBuilder builder = ui.SceneBuilder();
    final ui.Scene scene = layer!.buildScene(builder);
    if (automaticSystemUiAdjustment) {
      _updateSystemChrome();
    }
    _window.render(scene);
    scene.dispose();
    assert(() {
      if (debugRepaintRainbowEnabled || debugRepaintTextRainbowEnabled) {
        debugCurrentRepaintColor = debugCurrentRepaintColor.withHue((debugCurrentRepaintColor.hue + 2.0) % 360.0);
      }
      return true;
    }());
  } finally {
    if (!kReleaseMode) {
      Timeline.finishSync();
    }
  }
}