class BufferCollageFlatland
Defined at line 80 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.h
This class takes ownership of the display and presents the contents of buffer collections in a
grid pattern. Unless otherwise noted, public methods are thread-safe and private methods must
only be called from the loop's thread.
Public Methods
void ~BufferCollageFlatland ()
Defined at line 49 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.cc
fpromise::result<std::unique_ptr<BufferCollageFlatland>, zx_status_t> Create (std::unique_ptr<simple_present::FlatlandConnection>flatland_connection,fuchsia::ui::composition::AllocatorHandleflatland_allocator,fuchsia::element::GraphicalPresenterHandlegraphical_presenter,fuchsia::sysmem2::AllocatorHandlesysmem_allocator,fit::closurestop_callback)
Creates a new BufferCollage instance using the provided interface handles. After returning, if
the instance stops running, either due to an error or explicit action, |stop_callback| is
invoked exactly once if non-null.
Defined at line 56 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.cc
fpromise::promise<uint32_t> AddCollection (fuchsia::sysmem2::BufferCollectionTokenHandletoken,fuchsia::images2::ImageFormatimage_format,std::stringdescription)
Registers a new buffer collection and adds it to the views, updating the layout of existing
collections to fit. Returns an id representing the collection. Collections are initially
hidden and must be made visible using PostSetCollectionVisibility.
Defined at line 95 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.cc
void RemoveCollection (uint32_t collection_id)
Removes the collection with the given |collection_id| from the view and updates the layout to
fill the vacated space. If |id| is not a valid collection, the instance stops.
Defined at line 225 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.cc
void PostShowBuffer (uint32_tcollection_id,uint32_tbuffer_index,zx::eventpair *release_fence,std::optional<fuchsia::math::RectF>subregion)
Updates the view to show the given |buffer_index| in for the given |collection_id|'s node.
Holds |release_fence| until the buffer is no longer needed, then closes the handle. If
non-null, |subregion| specifies what sub-region of the buffer to highlight.
Defined at line 267 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.cc
void PresentView ()
Present view to graphical presenter.
Defined at line 393 of file ../../src/camera/bin/camera-gym/buffer_collage_flatland.cc