compositeFrame method
Uploads the composited layer tree to the engine.
Actually causes the output of the rendering pipeline to appear on screen.
Before calling this method, the owner must be set by calling attach, the configuration must be set to a non-null value, and the prepareInitialFrame method must have been called.
Implementation
void compositeFrame() {
if (!kReleaseMode) {
FlutterTimeline.startSync('COMPOSITING');
}
try {
assert(hasConfiguration, 'set the RenderView configuration before calling compositeFrame');
assert(_rootTransform != null, 'call prepareInitialFrame before calling compositeFrame');
assert(layer != null, 'call prepareInitialFrame before calling compositeFrame');
final ui.SceneBuilder builder = RendererBinding.instance.createSceneBuilder();
final ui.Scene scene = layer!.buildScene(builder);
if (automaticSystemUiAdjustment) {
_updateSystemChrome();
}
assert(configuration.logicalConstraints.isSatisfiedBy(size));
_view.render(scene, size: configuration.toPhysicalSize(size));
scene.dispose();
assert(() {
if (debugRepaintRainbowEnabled || debugRepaintTextRainbowEnabled) {
debugCurrentRepaintColor = debugCurrentRepaintColor.withHue((debugCurrentRepaintColor.hue + 2.0) % 360.0);
}
return true;
}());
} finally {
if (!kReleaseMode) {
FlutterTimeline.finishSync();
}
}
}