class Flatland

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

Implements the `fuchsia.ui.composition.Flatland` protocol. It is intended to run on its own

thread/dispatcher, and communicates with the main/render thread(s) via the UberStruct mechanism,

as well as other interfaces such as FlatlandPresenter. Because `fuchsia.ui.composition.Flatland`

is a stateful protocol, each client is connected to a different Flatland object.

Public Methods

std::shared_ptr<Flatland> New (std::shared_ptr<utils::DispatcherHolder> dispatcher_holder, fidl::ServerEnd<fuchsia_ui_composition::Flatland> server_end, scheduling::SessionId session_id, std::function<void ()> destroy_instance_function, std::shared_ptr<FlatlandPresenter> flatland_presenter, std::shared_ptr<LinkSystem> link_system, std::shared_ptr<UberStructSystem::UberStructQueue> uber_struct_queue, const std::vector<std::shared_ptr<allocation::BufferCollectionImporter>> & buffer_collection_importers, fit::function<void (fidl::ServerEnd<fuchsia_ui_views::Focuser>, zx_koid_t)> register_view_focuser, fit::function<void (fidl::ServerEnd<fuchsia_ui_views::ViewRefFocused>, zx_koid_t)> register_view_ref_focused, fit::function<void (fidl::ServerEnd<fuchsia_ui_pointer::TouchSource>, zx_koid_t)> register_touch_source, fit::function<void (fidl::ServerEnd<fuchsia_ui_pointer::MouseSource>, zx_koid_t)> register_mouse_source, fit::function<void (fidl::ServerEnd<fuchsia_ui_pointer::TouchSourceV2>, zx_koid_t)> register_touch_source_v2, fit::function<void (fidl::ServerEnd<fuchsia_ui_pointer::MouseSourceV2>, zx_koid_t)> register_mouse_source_v2, const FlatlandConfig & config)

Instantiates a new Flatland object and binds it to serve the Flatland protocol over the

`server_end` channel. Method invocations received on this channel will be serviced on

the thread managed by `dispatcher_holder`.

The `destroy_instance_function` is called to notify the instance's manager that the instance

should be destroyed. This function is invoked on the thread owned by `dispatcher_holder`. When

this function is invoked, the client FIDL connection has already been closed. There are two

situations that result in the invocation of `destroy_instance_function`:

- the client closes the FIDL channel

- the client makes illegal use of the API (or associated APIs like ChildViewWatcher)

`flatland_presenter`, `link_system`, `uber_struct_queue`, and `buffer_collection_importers`

allow this Flatland object to access resources shared by all Flatland instances for actions

like frame scheduling, linking, buffer allocation, and presentation to the global scene graph.

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

void Flatland (const Flatland & )

Because this object captures its "this" pointer in internal closures, it is unsafe to copy or

move it. Disable all copy and move operations.

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

Flatland & operator= (const Flatland & )

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

void Flatland (Flatland && )

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

Flatland & operator= (Flatland && )

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

void ReplaceChildren (TransformId parent_transform_id, std::initializer_list<TransformId> new_child_transform_ids)

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

void SetHitRegions (TransformId transform_id, std::initializer_list<fuchsia_ui_composition::wire::HitRegion> regions)

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

void ~Flatland ()

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

void SetStackLayers (LayerStackId layer_stack_id, std::initializer_list<LayerId> layers)

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

void Present (PresentRequestView request, PresentCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void Present (fuchsia_ui_composition::wire::PresentArgs & args)

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

const FlatlandConfig & config ()

Allow others to see how this Flatland session is configured.

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

void SetLayerStackData (TransformHandle stack_handle, std::initializer_list<LayerHandle> layers)

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

void CreateView (CreateViewRequestView request, CreateViewCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void CreateView (fuchsia_ui_views::wire::ViewCreationToken token, fidl::ServerEnd<fuchsia_ui_composition::ParentViewportWatcher> parent_viewport_watcher)

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

void CreateView2 (CreateView2RequestView request, CreateView2Completer::Sync & completer)

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

void CreateView2 (fuchsia_ui_views::wire::ViewCreationToken token, fuchsia_ui_views::wire::ViewIdentityOnCreation view_identity, fuchsia_ui_composition::wire::ViewBoundProtocols protocols, fidl::ServerEnd<fuchsia_ui_composition::ParentViewportWatcher> parent_viewport_watcher)

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

void ReleaseView (ReleaseViewCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

TODO(https://fxbug.dev/42162046): Consider returning tokens for re-linking.

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

void ReleaseView ()

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

void Clear (ClearCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void Clear ()

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

void CreateTransform (CreateTransformRequestView request, CreateTransformCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void CreateTransform (TransformId transform_id)

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

void SetTranslation (SetTranslationRequestView request, SetTranslationCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetTranslation (TransformId transform_id, fuchsia_math::wire::Vec translation)

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

void SetOrientation (SetOrientationRequestView request, SetOrientationCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetOrientation (TransformId transform_id, fuchsia_ui_composition::Orientation orientation)

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

void SetScale (SetScaleRequestView request, SetScaleCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetScale (TransformId transform_id, fuchsia_math::wire::VecF scale)

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

void SetOpacity (SetOpacityRequestView request, SetOpacityCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetOpacity (TransformId transform_id, float value)

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

void SetClipBoundary (SetClipBoundaryRequestView request, SetClipBoundaryCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetClipBoundary (TransformId transform_id, std::optional<fuchsia_math::wire::Rect> bounds)

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

void AddChild (AddChildRequestView request, AddChildCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void AddChild (TransformId parent_transform_id, TransformId child_transform_id)

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

void RemoveChild (RemoveChildRequestView request, RemoveChildCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void RemoveChild (TransformId parent_transform_id, TransformId child_transform_id)

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

void ReplaceChildren (ReplaceChildrenRequestView request, ReplaceChildrenCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void ReplaceChildren (TransformId parent_transform_id, std::span<const TransformId> new_child_transform_ids)

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

void SetRootTransform (SetRootTransformRequestView request, SetRootTransformCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetRootTransform (TransformId transform_id)

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

void CreateViewport (CreateViewportRequestView request, CreateViewportCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void CreateViewport (ContentId viewport_id, fuchsia_ui_views::wire::ViewportCreationToken token, const fuchsia_ui_composition::wire::ViewportProperties & properties, fidl::ServerEnd<fuchsia_ui_composition::ChildViewWatcher> child_view_watcher)

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

void CreateViewport2 (CreateViewport2RequestView request, CreateViewport2Completer::Sync & completer)

TODO(https://fxbug.dev/474444799): This is a stub; the only thing it is supposed to demonstrate

is that it captures "illegal usage".

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

void CreateViewport2 (ViewportId viewport_id, fuchsia_ui_views::wire::ViewportCreationToken token, const fuchsia_ui_composition::wire::ViewportProperties & properties, fidl::ServerEnd<fuchsia_ui_composition::ChildViewWatcher> child_view_watcher)

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

void CreateImage (CreateImageRequestView request, CreateImageCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void CreateImage (ContentId image_id, fuchsia_ui_composition::wire::BufferCollectionImportToken import_token, uint32_t vmo_index, const fuchsia_ui_composition::wire::ImageProperties & properties)

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

void CreateImage2 (CreateImage2RequestView request, CreateImage2Completer::Sync & completer)

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

void CreateImage2 (ImageId image_id, fuchsia_ui_composition::wire::BufferCollectionImportToken import_token, uint32_t vmo_index, const fuchsia_ui_composition::wire::ImageProperties & properties)

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

void SetImageSampleRegion (SetImageSampleRegionRequestView request, SetImageSampleRegionCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetImageSampleRegion (ContentId image_id, types::RectangleF rect)

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

void SetImageDestinationSize (SetImageDestinationSizeRequestView request, SetImageDestinationSizeCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetImageDestinationSize (ContentId image_id, fuchsia_math::wire::SizeU size)

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

void SetImageBlendingFunction (SetImageBlendingFunctionRequestView request, SetImageBlendingFunctionCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetImageBlendMode (SetImageBlendModeRequestView request, SetImageBlendModeCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetImageBlendMode (ContentId image_id, BlendMode blend_mode)

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

void SetImageFlip (SetImageFlipRequestView request, SetImageFlipCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetImageFlip (ContentId image_id, fuchsia_ui_composition::ImageFlip flip)

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

void CreateFilledRect (CreateFilledRectRequestView request, CreateFilledRectCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void CreateFilledRect (ContentId rect_id)

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

void SetSolidFill (SetSolidFillRequestView request, SetSolidFillCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetSolidFill (ContentId rect_id, fuchsia_ui_composition::wire::ColorRgba color, fuchsia_math::wire::SizeU size)

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

void ReleaseFilledRect (ReleaseFilledRectRequestView request, ReleaseFilledRectCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void ReleaseFilledRect (ContentId rect_id)

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

void SetImageOpacity (SetImageOpacityRequestView request, SetImageOpacityCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetImageOpacity (ContentId image_id, float opacity)

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

void SetHitRegions (SetHitRegionsRequestView request, SetHitRegionsCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetHitRegions (TransformId transform_id, std::span<const fuchsia_ui_composition::wire::HitRegion> regions)

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

void SetInfiniteHitRegion (SetInfiniteHitRegionRequestView request, SetInfiniteHitRegionCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetInfiniteHitRegion (TransformId transform_id, fuchsia_ui_composition::HitTestInteraction hit_test)

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

void SetContent (SetContentRequestView request, SetContentCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetContent (TransformId transform_id, ContentId content_id)

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

void SetTransformContent (SetTransformContentRequestView request, SetTransformContentCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void SetTransformContent (TransformId transform_id, const fuchsia_ui_composition::wire::TransformContent * content)

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

void SetTransformContent (TransformId transform_id, LayerStackId layer_stack_id)

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

void SetTransformContent (TransformId transform_id, ViewportId viewport_id)

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

void ClearTransformContent (TransformId transform_id)

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

void SetViewportProperties (SetViewportPropertiesRequestView request, SetViewportPropertiesCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetViewportProperties (ContentId viewport_id, const fuchsia_ui_composition::wire::ViewportProperties & properties)

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

void SetViewportProperties2 (SetViewportProperties2RequestView request, SetViewportProperties2Completer::Sync & completer)

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

void SetViewportProperties2 (ViewportId viewport_id, const fuchsia_ui_composition::wire::ViewportProperties & properties)

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

void ReleaseTransform (ReleaseTransformRequestView request, ReleaseTransformCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void ReleaseTransform (TransformId transform_id)

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

void ReleaseViewport (ReleaseViewportRequestView request, ReleaseViewportCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void ReleaseViewport (ContentId viewport_id, fit::function<void (fuchsia_ui_views::wire::ViewportCreationToken)> completer)

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

void ReleaseViewport2 (ReleaseViewport2RequestView request, ReleaseViewport2Completer::Sync & completer)

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

void ReleaseViewport2 (ViewportId viewport_id, fit::function<void (fuchsia_ui_views::wire::ViewportCreationToken)> completer)

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

void ReleaseImage (ReleaseImageRequestView request, ReleaseImageCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void ReleaseImage (ContentId image_id)

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

void ReleaseImage2 (ReleaseImage2RequestView request, ReleaseImage2Completer::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void ReleaseImage2 (ImageId image_id)

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

void SetDebugName (SetDebugNameRequestView request, SetDebugNameCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void SetDebugName (std::string name)

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

void ReleaseImageImmediately (ReleaseImageImmediatelyRequestView request, ReleaseImageImmediatelyCompleter::Sync & completer)

|fuchsia_ui_composition::TrustedFlatland|

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

void ReleaseImageImmediately (ContentId image_id)

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

void ReleaseImageImmediately2 (ReleaseImageImmediately2RequestView request, ReleaseImageImmediately2Completer::Sync & completer)

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

void ReleaseImageImmediately2 (ImageId image_id)

TODO(https://fxbug.dev/474444799): This is a stub; the only thing it is supposed to demonstrate

is that it captures "illegal usage". See TODO in CreateLayer.

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

void CreateLayer (CreateLayerRequestView request, CreateLayerCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void CreateLayer (LayerId layer_id)

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

void ReleaseLayer (ReleaseLayerRequestView request, ReleaseLayerCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void ReleaseLayer (LayerId layer_id)

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

void CreateLayerStack (CreateLayerStackRequestView request, CreateLayerStackCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void CreateLayerStack (LayerStackId layer_stack_id)

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

void ReleaseLayerStack (ReleaseLayerStackRequestView request, ReleaseLayerStackCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void ReleaseLayerStack (LayerStackId layer_stack_id)

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

void SetStackLayers (SetStackLayersRequestView request, SetStackLayersCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void SetStackLayers (LayerStackId layer_stack_id, std::span<const LayerId> layers)

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

void SetLayerImage (SetLayerImageRequestView request, SetLayerImageCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void SetLayerImage (LayerId layer_id, ImageId image_id, std::optional<fuchsia_ui_composition::wire::WaitFence> acquire_fence, std::optional<fuchsia_ui_composition::wire::SignalFence> release_fence)

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

void SetLayerProperties (SetLayerPropertiesRequestView request, SetLayerPropertiesCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void SetLayerProperties (LayerId layer_id, const fuchsia_ui_composition::wire::LayerProperties & properties)

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

void ResetLayer (ResetLayerRequestView request, ResetLayerCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland2|

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

void ResetLayer (LayerId layer_id)

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

void OnNextFrameBegin (uint32_t additional_present_credits, FuturePresentationInfos presentation_infos)

Called just before the FIDL client receives the event of the same name, indicating that this

Flatland instance should allow a |additional_present_credits| calls to Present().

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

void OnFramePresented (const std::map<scheduling::PresentId, zx::time> & latched_times, scheduling::PresentTimestamps present_times)

Called when this Flatland instance should send the OnFramePresented() event to the FIDL

client.

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

TransformHandle GetRoot ()

For validating the transform hierarchy in tests only. For the sake of testing, the "root" will

always be the top-most TransformHandle from the TransformGraph owned by this Flatland. If

currently linked to a parent, that means the Link's child_transform_handle. If not, that means

the local_root_.

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

std::optional<TransformHandle> GetContentHandle (ContentId content_id)

For validating properties associated with content in tests only. If |content_id| does not

exist for this Flatland instance, returns std::nullopt.

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

std::optional<TransformHandle> GetLayerStackHandleForTest (LayerStackId layer_stack_id)

For validating properties associated with layer stacks in tests only. If |layer_stack_id| does

not exist for this Flatland instance, returns std::nullopt.

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

std::optional<TransformHandle> GetTransformHandle (TransformId transform_id)

For validating properties associated with transforms in tests only. If |transform_id| does not

exist for this Flatland instance, returns std::nullopt.

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

void SetErrorReporter (std::unique_ptr<scenic_impl::ErrorReporter> error_reporter)

For validating logs in tests only.

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

scheduling::SessionId GetSessionId ()

For using as a unique identifier in tests only.

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

LayerHandle CreateLayerObject ()

TODO(https://fxbug.dev/523371761): public for tests. Later, revisit whether any can be

made private (if so, they'll be reordered in the file).

Consider using `friend class FlatlandTest`.

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

void ReleaseLayerObject (LayerHandle handle)

Decrements `LayerObject` ref count, destroying it at zero. When destroyed, any bound image is

released via `UnbindLayerImage()`.

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

TransformHandle CreateLayerStackData ()

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

void SetLayerStackData (TransformHandle stack_handle, std::span<const LayerHandle> layers)

Replaces the stack's entire existing layer list with `layers`. This operation

adjusts each affected LayerObject's ref_count: +1 for each handle newly added

(per occurrence) and -1 for each handle removed from the stack (via ReleaseLayerObject).

A pure reorder is ref-count-neutral. Layers destroyed by the decrement follow

the normal ReleaseLayerObject path (bound image into the release machinery).

Every handle in `layers` must exist in layer_objects_.

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

std::vector<allocation::GlobalImageId> CleanupFlatland2StateForTest (const std::vector<TransformHandle> & dead_handles)

Test-only accessor/mutators

TODO(https://fxbug.dev/523371761): once everything lands, verify whether these are necessary

to keep, or whether they are well-covered by tests for production callers such as

`CreateImage()` and `ProcessDeadTransforms()`.

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

void SetLayerImageForTest (LayerHandle handle, allocation::GlobalImageId image)

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

void UnbindLayerImageForTest (LayerHandle handle)

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

void SetLayerSolidColorForTest (LayerHandle handle)

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

LayerObject * GetLayerObjectForTest (LayerHandle handle)

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

const ImageObject * GetImageObjectForTest (allocation::GlobalImageId global_id)

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

const LayerStackData * GetLayerStackDataForTest (TransformHandle handle)

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

void ReleaseTransformForTest (TransformHandle handle)

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

void SetPriorityChildForTest (TransformId parent, TransformHandle child)

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

LayerHandle GetLayerHandleForTest (LayerId layer_id)

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

size_t PendingImageReleaseCountForTest ()

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

allocation::GlobalImageId GetGlobalImageIdForTest (ImageId image_id)

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