class Engine
Defined at line 36 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 Members
static const uint32_t kNumDisplayFramebuffers
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::Nodeinspect_node,GetRootTransformFuncget_root_transform)
Defined at line 30 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc
void ~Engine ()
Defined at line 43 of file ../../src/ui/scenic/lib/flatland/engine/engine.h
void RenderScheduledFrame (uint64_tframe_number,zx::timepresentation_time,const FlatlandDisplay &display,scheduling::FramePresentedCallbackcallback)
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 77 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc
void UpdateLinkWatchersAfterViewTreePublished ()
Dispatches updated layout information (coordinate transforms, view dimensions,
device pixel ratio, etc.) to layout observers and link watchers based on the
current frame's scene state.
CRITICAL: This must be called *after* the new ViewTree snapshot has been fully
updated and published (e.g. in `UpdateSnapshot()`), but *before* the frame's scene
state is cleared by `CleanUpFrame()`. This ensures layout observers do not query
or receive layout updates against a stale ViewTree snapshot.
Defined at line 181 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 191 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 209 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.
Pass `rotate_scene_state = true` if calling outside of `RenderScheduledFrame()` where
`current_scene_state_` has not already been rotated from `cleared_scene_state_`.
Defined at line 306 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc
void AddDisplay (display::Display & display, uint32_t num_vmos)
Defined at line 326 of file ../../src/ui/scenic/lib/flatland/engine/engine.cc