class BufferCollectionInfo
Defined at line 21 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.h
|BufferCollectionInfo| stores the information regarding a BufferCollection.
Instantiated via calls to |New| below.
Public Methods
fit::result<fit::failed, BufferCollectionInfo> New (fuchsia::sysmem2::Allocator_Sync * sysmem_allocator, BufferCollectionHandle buffer_collection_token, std::optional<fuchsia::sysmem2::ImageFormatConstraints> image_format_constraints, fuchsia::sysmem2::BufferUsage buffer_usage, allocation::BufferCollectionUsage usage)
Creates a new |BufferCollectionInfo| instance. The return value is null if the buffer was
not created successfully. This function sets the server-side sysmem image constraints.
TODO(https://fxbug.dev/42125043): Make this an asynchronous call. This function is currently
thread safe as Allocator_Sync pointers are thread safe, but if this becomes async it may become
unsafe.
Defined at line 35 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.cc
void ~BufferCollectionInfo ()
Defined at line 12 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.cc
BufferCollectionInfo & operator= (BufferCollectionInfo && other)
Defined at line 18 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.cc
void BufferCollectionInfo (BufferCollectionInfo && other)
Defined at line 27 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.cc
void BufferCollectionInfo ()
Creates a non-initialized instance of this class. Fully initialized instances must
be created via a call to |New|.
Defined at line 44 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.h
void BufferCollectionInfo (const BufferCollectionInfo & other)
Defined at line 48 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.h
BufferCollectionInfo & operator= (const BufferCollectionInfo & other)
Defined at line 49 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.h
const fuchsia::sysmem2::BufferCollectionInfo & GetSysmemInfo ()
Info describing |buffer_collection_ptr|. Do not call this until after verifying the allocation
status of the buffer collection with BuffersAreAllocated().
Defined at line 66 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.h
bool BuffersAreAllocated ()
This BufferCollectionInfo may not be allocated due to the fact that it may not necessarily
have all constraints set from every client with a token. This function will return false if
that is the case and true if the buffer collection has actually been allocated. Additionally,
if this function returns true, the client will be able to access the sysmem information of
the collection via a call to GetSysmemInfo(). Once this function returns true, it won't ever
return |false| again.
This function is thread-safe because |buffer_collection_ptr_|, which is a
SynchronousInterfacePtr, is thread-safe. This function will return false if the buffers are not
able to be constructed, for example if there are incompatible constraints that are set on the
server and client.
Defined at line 110 of file ../../src/ui/scenic/lib/flatland/buffers/buffer_collection.cc