class DisplayCompositorTest
Defined at line 170 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
Protected Members
uint64_t next_layer_id_
Loop display_coordinator_loop_
unique_ptr mock_display_coordinator_
shared_ptr renderer_
Inspector inspector_
shared_ptr display_compositor_
WireClient sysmem_allocator_
optional dispatcher_setter_
FakeFrameScheduler fake_frame_scheduler_
Public Methods
void SetUp ()
Defined at line 172 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void TearDown ()
Defined at line 211 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
fidl::ClientEnd<fuchsia_sysmem2::BufferCollectionToken> CreateToken ()
Defined at line 232 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void SetDisplaySupported (allocation::GlobalBufferCollectionIdid,boolis_supported,std::optional<DisplayBufferCollectionMetadata>metadata)
Defined at line 248 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void ForceRendererOnlyMode (bool force_renderer_only)
Defined at line 261 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void SendOnVsyncEvent (display::WireConfigStamp stamp)
Defined at line 265 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
std::deque<DisplayCompositor::ApplyConfigInfo> GetPendingApplyConfigs ()
Defined at line 269 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
bool BufferCollectionSupportsDisplay (allocation::GlobalBufferCollectionId id)
Defined at line 273 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
bool HasDisplaySupportEntry (allocation::GlobalBufferCollectionId id)
Defined at line 278 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
bool TryDirectToDisplay (std::span<const RenderData> render_data_list)
Defined at line 283 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void AddSyntheticRenderTarget (display::DisplayId display_id, const ImageMetadata & render_target)
Populates `display_engine_data_map_[display_id]` with a synthetic render target and wait
event so `PerformGpuComposition()` can run without going through `AddDisplay()` sysmem
allocation.
Defined at line 292 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void ClearSyntheticRenderTargets (display::DisplayId display_id)
Clears the synthetic render target added by `AddSyntheticRenderTarget()`. Call before test
teardown so cleanup does not treat the synthetic render target as a real imported image.
Defined at line 313 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
fidl::ClientEnd<fuchsia_sysmem2::BufferCollectionToken> ImportDisplaySupportedClientCollection (allocation::GlobalBufferCollectionId collection_id, std::optional<DisplayCompositor::DisplayBufferCollectionMetadata> metadata)
Imports `collection_id` as a display-supported client buffer collection and returns the
renderer token to keep it alive for the duration of the test.
Defined at line 326 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
ResolvedLayer MakeImageLayer (const ImageMetadata & metadata)
Builds a full-image `ResolvedLayer` for `metadata`.
Defined at line 368 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void AddDisplayWithExpectations (display::Display * display, const DisplayInfo & display_info)
`AddDisplay()` with the mock expectations it needs. Layer ids are 1 (the
empty-scene layer) through `kMaxDisplayLayersCount + 1`.
Defined at line 392 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void ExpectDisplayCleanup ()
Expectations for the `DisplayCompositor` destructor after `AddDisplayWithExpectations()`.
Defined at line 409 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
ClientImageUsageCounts ReadClientImageUsageCounts ()
Defined at line 433 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void ExpectSetDisplayPowerMode (fuchsia_hardware_display_types::PowerMode expected_mode, zx_status_t reply)
One `SetDisplayPowerMode()` call on the mock, replying `reply`. Set this up right
before each `DisplayCompositor::SetDisplayPowerMode()` call.
Defined at line 461 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
Protected Methods
bool RunPromise (fpromise::promise<> promise)
Defined at line 481 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc
void HardwareFrameCorrectnessWithRotationTester (Orientationorientation,ImageFlipimage_flip,fuchsia_math::wire::RectUexpected_dst,display::WireCoordinateTransformationexpected_transform)
The rotation and flip tests below share the following setup:
the layer draws a 128×256 image (full sample region) into a 10×20 destination rect
at the origin; each test below varies only the rotation/flip.
Defined at line 1592 of file ../../src/ui/scenic/lib/flatland/engine/tests/display_compositor_unittest.cc