class FlatlandTest

Defined at line 203 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

Protected Members

ComponentContextProvider context_provider_
shared_ptr uber_struct_system_
::testing::StrictMock<MockFlatlandPresenter> * mock_flatland_presenter_
shared_ptr flatland_presenter_
allocation::MockBufferCollectionImporter * mock_buffer_collection_importer_
shared_ptr buffer_collection_importer_
vector flatlands_
vector flatland_displays_
unordered_map flatland_errors_
tvec2 display_pixel_ratio_
map pending_release_fences_
map pending_release_counters_
map requested_presentation_times_
unordered_map pending_instance_updates_
WireClient sysmem_allocator_

Public Methods

void FlatlandTest ()

Defined at line 205 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

void SetUp ()

Defined at line 209 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

void TearDown ()

Defined at line 266 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::shared_ptr<allocation::Allocator> CreateAllocator ()

Defined at line 278 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::shared_ptr<Flatland> CreateFlatland (const FlatlandConfig & config)

Defined at line 287 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::unique_ptr<FlatlandEventLoopClientServer> CreateFlatlandEventLoopClientServer ()

Defined at line 390 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::shared_ptr<FlatlandDisplay> CreateFlatlandDisplay (uint32_t width_in_px, uint32_t height_in_px)

Defined at line 395 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

fidl::InterfaceHandle<fuchsia::sysmem2::BufferCollectionToken> CreateToken ()

Defined at line 409 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

void ApplySessionUpdatesAndSignalFences ()

Applies the most recently scheduled session update for each session and signals the release

fences of all Presents up to and including that update.

Defined at line 428 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::vector<scheduling::PresentId> GetRegisteredPresents (scheduling::SessionId session_id)

Gets the list of registered PresentIds for a particular |session_id|.

Defined at line 457 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

bool HasSessionUpdate (scheduling::SessionId session_id)

Returns true if |session_id| currently has a session update pending.

Defined at line 470 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::optional<zx::time> GetRequestedPresentationTime (scheduling::SchedulingIdPair id_pair)

Returns the requested presentation time for a particular |id_pair|, or std::nullopt if that

pair has not had a presentation scheduled for it.

Defined at line 476 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

bool IsDescendantOf (TransformHandle parent, TransformHandle child)

The parent transform must be a topology root or ComputeGlobalTopologyData() will crash.

Defined at line 485 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

std::shared_ptr<const UberStruct> GetUberStruct (Flatland * flatland)

Snapshots the UberStructSystem and fetches the UberStruct associated with |flatland|. If no

UberStruct exists for |flatland|, returns nullptr.

Defined at line 500 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

void UpdateLinks (TransformHandle root_transform)

Updates all Links reachable from |root_transform|, which must be the root transform of one of

the active Flatland instances.

Tests that call this function are testing both Flatland and LinkSystem::UpdateLinkWatchers().

Defined at line 520 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

void CreateViewport (Flatland * parent, Flatland * child, ContentId viewport_id, fidl::ServerEnd<fuchsia_ui_composition::ChildViewWatcher> child_view_watcher, fidl::ServerEnd<fuchsia_ui_composition::ParentViewportWatcher> parent_viewport_watcher)

Defined at line 539 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

void SetDisplayContent (FlatlandDisplay * display, Flatland * child, fidl::ServerEnd<fuchsia_ui_composition::ChildViewWatcher> child_view_watcher_server_end, fidl::ServerEnd<fuchsia_ui_composition::ParentViewportWatcher> parent_viewport_watcher_server_end)

Defined at line 566 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

GlobalIdPair CreateImage (Flatland * flatland, allocation::Allocator * allocator, ContentId image_id, allocation::cpp::BufferCollectionImportExportTokens buffer_collection_import_export_tokens, fuchsia_ui_composition::ImageProperties properties)

Helper function to create an image, registering it with sysmem and flatland, and presenting.

Defined at line 591 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

fuchsia_ui_composition::FlatlandError GetFlatlandError (scheduling::SessionId session_id)

Checks the output of GetFlatlandError() for a particular session.

Defined at line 620 of file ../../src/ui/scenic/lib/flatland/tests/flatland_unittest.h

Records