renderViews method
Renders a list of views of this scene onto canvas.
Each RenderView binds a camera to a normalized sub-rectangle of
region (its RenderView.viewport), a RenderView.layerMask, and a
compositing RenderView.order; views are drawn lowest-order first.
This is how split-screen and picture-in-picture are rendered. render
is the single-view convenience over this.
Each view renders into its own offscreen target (its own swapchain texture and transient texture pool), so simultaneous views never share a render target within a frame.
region is the canvas rectangle the views subdivide; it defaults to
the canvas clip bounds. pixelRatio is the logical-to-physical
multiplier for the offscreen render targets (defaults to the view's
device pixel ratio).
The scene is advanced once per call (a single per-frame tick), then every view is rendered from that shared scene state.
Implementation
void renderViews(
List<RenderView> views,
ui.Canvas canvas, {
ui.Rect? region,
double? pixelRatio,
}) => renderViewGroups(
[
for (final view in views) RenderViewGroup([view]),
],
canvas,
region: region,
pixelRatio: pixelRatio,
);