PROTOCOLS
Allocator
Defined in fuchsia.scenic.allocation/allocator.fidl
RegisterBufferCollection
A BufferCollection is a set of VMOs created by Sysmem and shared by a number of participants, one of which is the Flatland Renderer. Some content, such as Images, use a BufferCollection as their backing memory.
Clients can send export_token
to register buffer collections with Allocator to be used
later in fuchsia.ui.scenic.internal/Flatland instances or other Scenic APIs. For
example, by passing a BufferCollectionImportToken containing the matching peer of
BufferCollectionExportToken, they can create image resources via
fuchsia.ui.scenic.internal/Flatland.CreateImage. Clients should wait for the response
before using import_token
.
Flatland participates in the allocation of buffers by setting constraints on the
BufferCollection referenced by buffer_collection_token
. It will not block on buffers
being allocated until the client creates content using the BufferCollection.
The buffer collection registered with export_token
is available and kept alive as long
as the client holds a valid BufferCollectionImportToken. They will be garbage collected
when all BufferCollectionImportTokens are closed and all the associated Image resources
are released.
Request
Name | Type |
---|---|
export_token |
BufferCollectionExportToken
|
buffer_collection_token |
fuchsia.sysmem/BufferCollectionToken
|
Response
Name | Type |
---|---|
result |
Allocator_RegisterBufferCollection_Result
|
STRUCTS
Allocator_RegisterBufferCollection_Response
Defined in fuchsia.scenic.allocation/allocator.fidl
Name | Type | Description | Default |
---|
BufferCollectionExportToken
Defined in fuchsia.scenic.allocation/allocator.fidl
A typed wrapper for an eventpair, representing the registry endpoint of a buffer collection.
Name | Type | Description | Default |
---|---|---|---|
value |
handle<eventpair>
|
No default |
BufferCollectionImportToken
Defined in fuchsia.scenic.allocation/allocator.fidl
A typed wrapper for an eventpair, representing the Image import endpoint of a buffer collection.
Name | Type | Description | Default |
---|---|---|---|
value |
handle<eventpair>
|
No default |
ENUMS
RegisterBufferCollectionError
Type: uint32
Defined in fuchsia.scenic.allocation/allocator.fidl
Name | Value | Description |
---|---|---|
BAD_OPERATION |
1 |
UNIONS
Allocator_RegisterBufferCollection_Result
Defined in fuchsia.scenic.allocation/allocator.fidl
Name | Type | Description |
---|---|---|
response |
Allocator_RegisterBufferCollection_Response
|
|
err |
RegisterBufferCollectionError
|