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 Present (PresentRequestView request, PresentCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

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

Defined at line 357 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

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 590 of file ../../src/ui/scenic/lib/flatland/flatland.h

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

|fuchsia_ui_composition::Flatland|

Defined at line 678 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 683 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

Defined at line 690 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 696 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 843 of file ../../src/ui/scenic/lib/flatland/flatland.cc

void ReleaseView ()

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

void Clear (ClearCompleter::Sync & completer)

|fuchsia_ui_composition::Flatland|

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

void Clear ()

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

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

|fuchsia_ui_composition::Flatland|

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

void CreateTransform (TransformId transform_id)

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

void SetOpacity (TransformId transform_id, float value)

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

void AddChild (TransformId parent_transform_id, TransformId child_transform_id)

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

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

|fuchsia_ui_composition::Flatland|

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

void RemoveChild (TransformId parent_transform_id, TransformId child_transform_id)

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

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

|fuchsia_ui_composition::Flatland|

Defined at line 1238 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 1254 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland|

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

void SetRootTransform (TransformId transform_id)

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

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

|fuchsia_ui_composition::Flatland|

Defined at line 1345 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 1353 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 1503 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 1509 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland|

Defined at line 1612 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 1619 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

Defined at line 1680 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 1686 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

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

|fuchsia_ui_composition::Flatland|

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

void SetImageBlendMode (ContentId image_id, BlendMode blend_mode)

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

void CreateFilledRect (ContentId rect_id)

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

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

|fuchsia_ui_composition::Flatland|

Defined at line 1965 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 1970 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland|

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

void ReleaseFilledRect (ContentId rect_id)

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

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

|fuchsia_ui_composition::Flatland|

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

void SetImageOpacity (ContentId image_id, float opacity)

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

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

|fuchsia_ui_composition::Flatland|

Defined at line 2114 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 2120 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

void SetContent (TransformId transform_id, ContentId content_id)

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

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

|fuchsia_ui_composition::Flatland2|

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

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

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

void SetTransformContent (TransformId transform_id, LayerStackId layer_stack_id)

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

void SetTransformContent (TransformId transform_id, ViewportId viewport_id)

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

void ClearTransformContent (TransformId transform_id)

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

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

|fuchsia_ui_composition::Flatland|

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

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

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

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

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

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

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

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

|fuchsia_ui_composition::Flatland|

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

void ReleaseTransform (TransformId transform_id)

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

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

|fuchsia_ui_composition::Flatland|

Defined at line 2483 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 2492 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

Defined at line 2563 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 2572 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland|

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

void ReleaseImage (ContentId image_id)

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

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

|fuchsia_ui_composition::Flatland2|

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

void ReleaseImage2 (ImageId image_id)

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

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

|fuchsia_ui_composition::Flatland|

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

void SetDebugName (std::string name)

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

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

|fuchsia_ui_composition::TrustedFlatland|

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

void ReleaseImageImmediately (ContentId image_id)

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

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

Defined at line 2757 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 2764 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland2|

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

void CreateLayer (LayerId layer_id)

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

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

|fuchsia_ui_composition::Flatland2|

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

void ReleaseLayer (LayerId layer_id)

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

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

|fuchsia_ui_composition::Flatland2|

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

void CreateLayerStack (LayerStackId layer_stack_id)

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

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

|fuchsia_ui_composition::Flatland2|

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

void ReleaseLayerStack (LayerStackId layer_stack_id)

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

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

|fuchsia_ui_composition::Flatland2|

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

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

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

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

|fuchsia_ui_composition::Flatland2|

Defined at line 2972 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 2983 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

|fuchsia_ui_composition::Flatland2|

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

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

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

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

|fuchsia_ui_composition::Flatland2|

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

void ResetLayer (LayerId layer_id)

Defined at line 3175 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 3200 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 3221 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 3255 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 3259 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 3565 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 3269 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 3277 of file ../../src/ui/scenic/lib/flatland/flatland.cc

scheduling::SessionId GetSessionId ()

For using as a unique identifier in tests only.

Defined at line 3281 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 3371 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 3440 of file ../../src/ui/scenic/lib/flatland/flatland.cc

TransformHandle CreateLayerStackData ()

Defined at line 3453 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 3459 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 3477 of file ../../src/ui/scenic/lib/flatland/flatland.cc

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

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

void SetLayerSolidColorForTest (LayerHandle handle)

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

LayerObject * GetLayerObjectForTest (LayerHandle handle)

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

const ImageObject * GetImageObjectForTest (allocation::GlobalImageId global_id)

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

const LayerStackData * GetLayerStackDataForTest (TransformHandle handle)

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

void ReleaseTransformForTest (TransformHandle handle)

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

void SetPriorityChildForTest (TransformId parent, TransformHandle child)

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

LayerHandle GetLayerHandleForTest (LayerId layer_id)

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

size_t PendingImageReleaseCountForTest ()

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

allocation::GlobalImageId GetGlobalImageIdForTest (ImageId image_id)

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