class DisplayCompositorPixelTest
Defined at line 293 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
Protected Members
optional realm_root_
WireClient sysmem_allocator_
unique_ptr executor_
unique_ptr display_manager_
display::Display::VsyncCallbackId vsync_callback_id_
Public Methods
void SetUp ()
Defined at line 295 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
void TearDown ()
Defined at line 346 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
bool IsDisplaySupported (DisplayCompositor * display_compositor, allocation::GlobalBufferCollectionId id)
Defined at line 353 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
fidl::WireSharedClient<fuchsia_hardware_display::Coordinator> & raw_display_coordinator ()
Defined at line 359 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
Protected Methods
bool RunPromise (fpromise::promise<> promise)
Run promise on this test case's executor.
Return true if result is_ok().
Defined at line 378 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
std::pair<std::unique_ptr<escher::Escher>, std::shared_ptr<flatland::VkRenderer>> NewVkRenderer ()
Defined at line 384 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
std::shared_ptr<flatland::NullRenderer> NewNullRenderer ()
Defined at line 393 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
fidl::ClientEnd<fuchsia_io::Directory> OpenServiceRoot ()
Defined at line 397 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
void WaitOnVSync ()
To avoid flakes, tests call this function to ensure that config stamps applied by
the display compositor are fully applied to the display coordinator before engaging
in any operations (e.g. reading back pixels from the display) that first require
these processes to have been completed.
Defined at line 412 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
fpromise::result<fuchsia::sysmem2::BufferCollectionSyncPtr, zx_status_t> SetupCapture (allocation::GlobalBufferCollectionIdcollection_id,fuchsia::images2::PixelFormatpixel_type,fuchsia::sysmem2::BufferCollectionInfo *collection_info,allocation::GlobalImageIdimage_id)
Set up the buffer collections and images to be used for capturing the diplay coordinator's
output. The only devices which currently implement the capture functionality on their
display coordinators are the AMLOGIC devices, and so we hardcode some of those AMLOGIC
assumptions here, such as making the pixel format for the capture image BGR24, as that
is the only capture format that AMLOGIC supports.
`image_id` must be an unique image ID not used by any other image.
TODO(https://fxbug.dev/42076499): Instead of providing hardcoded pixel type for
capture buffer, tests should let display driver make decision for the
capture buffer format, and use the sysmem format in BufferCollectionInfo
for capture-and-golden comparison.
Defined at line 459 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
fuchsia::sysmem2::BufferCollectionSyncPtr SetupClientTextures (DisplayCompositor *display_compositor,allocation::GlobalBufferCollectionIdcollection_id,fuchsia::images2::PixelFormatpixel_format,uint32_twidth,uint32_theight,uint32_tnum_vmos,fuchsia::sysmem2::BufferCollectionInfo *collection_info)
Sets up the buffer collection information for collections that will be imported
into the engine.
Defined at line 561 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
void ReleaseCaptureBufferCollection (allocation::GlobalBufferCollectionId collection_id)
Defined at line 592 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
void ReleaseClientTextureBufferCollection (DisplayCompositor * display_compositor, allocation::GlobalBufferCollectionId collection_id)
Defined at line 604 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
void CaptureDisplayOutput (display::CoordinatorProxy &display_coordinator,const fuchsia::sysmem2::BufferCollectionInfo &collection_info,allocation::GlobalImageIdcapture_image_id,std::vector<uint8_t> *read_values,boolrelease_capture_image)
Captures the pixel values on the display and reads them into |read_values|.
Defined at line 610 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
bool CaptureCompare (cpp20::span<const uint8_t>captured_image,cpp20::span<const uint8_t>input_image,fuchsia::images2::PixelFormatinput_image_pixel_format,uint32_theight,uint32_twidth)
Defined at line 658 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc
bool CaptureCompare (cpp20::span<const uint8_t>captured_image,cpp20::span<const uint8_t>input_image,fuchsia::images2::PixelFormatinput_image_pixel_format_type,intheight,intwidth)
Defined at line 679 of file ../../src/ui/scenic/lib/flatland/engine/tests/pixeltests/display_compositor_pixeltest.cc