class Engine

Defined at line 39 of file ../../src/ui/scenic/lib/flatland/engine/engine.h

Engine is responsible for building a display list for DisplayCompositor, to insulate it from

needing to know anything about the Flatland scene graph.

Public Methods

void Engine (std::shared_ptr<flatland::DisplayCompositor> flatland_compositor, std::shared_ptr<flatland::FlatlandPresenterImpl> flatland_presenter, std::shared_ptr<flatland::UberStructSystem> uber_struct_system, std::shared_ptr<flatland::LinkSystem> link_system, inspect::Node inspect_node, GetRootTransformFunc get_root_transform)

Defined at line 39 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc

void ~Engine ()

Defined at line 46 of file ../../src/ui/scenic/lib/flatland/engine/engine.h

void RenderScheduledFrame (uint64_t frame_number, zx::time presentation_time, const FlatlandDisplay & display, scheduling::FramePresentedCallback callback)

Orchestrates the generation and submission of a frame to the `DisplayCompositor`.

This updates scene topology and link watchers, culls invisible content, and

handles first-frame startup logic to avoid driving the display before content

is ready.

Defined at line 84 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc

void CleanUpFrame ()

Resets internal state to prepare for the next frame.

This completes the frame cycle; it must be called after every invocation of

`RenderScheduledFrame()` or `SkipRender()`. Attempting to render a new

frame without cleaning up the previous one will trigger a DCHECK.

Defined at line 193 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc

view_tree::GeneratedSubtreeSnapshot GenerateViewTreeSnapshot (const TransformHandle & root_transform)

Snapshots the current Flatland content tree rooted at |root_transform|. |root_transform| is set

from the root transform of the display returned from

|FlatlandManager::GetPrimaryFlatlandDisplayForRendering|.

Defined at line 210 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc

Renderables GetRenderables (const FlatlandDisplay & display)

Returns all renderables reachable from the display's root transform.

Defined at line 239 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc

void SkipRender (scheduling::FramePresentedCallback callback, bool rotate_scene_state)

Signal all release fences and skip rendering.

`rotate_scene_state == true` is probably what you want, unless you know you don't.

Defined at line 313 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc