pub struct RegisterBufferCollectionArgs {
pub export_token: Option<BufferCollectionExportToken>,
pub buffer_collection_token: Option<ClientEnd<BufferCollectionTokenMarker>>,
pub usage: Option<RegisterBufferCollectionUsage>,
pub usages: Option<RegisterBufferCollectionUsages>,
/* private fields */
}
Expand description
The table of arguments for [RegisterBufferCollection
]. Note that some
fields below are REQUIRED.
Fields§
§export_token: Option<BufferCollectionExportToken>
Clients can send [export_token
] to register buffer collections with Allocator to be used
later in [fuchsia.ui.composition/Flatland
] instances or other Scenic APIs, such as
Screenshot.
For example, by passing a BufferCollectionImportToken
containing the matching peer of
BufferCollectionExportToken
, they can create image resources via
[fuchsia.ui.composition/Flatland.CreateImage
].
Clients should wait for the response before using import_token
.
This field is REQUIRED.
buffer_collection_token: Option<ClientEnd<BufferCollectionTokenMarker>>
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 BufferCollectionImportToken
s are closed and all the associated Image resources
are released.
This field is REQUIRED.
usage: Option<RegisterBufferCollectionUsage>
The client can register a buffer collection for various uses, each coming with their own unique constraints.
This field is OPTIONAL. If usage
is omitted it will be treated as if
it has the DEFAULT option.
§Deprecation
This arg is deprecated at API version 9 with addition of |usages|.
If both the usages
and usage
fields are set, usages
takes precedence and usage
is
ignored.
usages: Option<RegisterBufferCollectionUsages>
The client can register a buffer collection for various uses and has the ability to combine usages if multiple are needed.
This field is OPTIONAL. If usages
is omitted it will be treated as if
it has only the DEFAULT option.
Trait Implementations§
source§impl Debug for RegisterBufferCollectionArgs
impl Debug for RegisterBufferCollectionArgs
source§impl Decode<RegisterBufferCollectionArgs> for RegisterBufferCollectionArgs
impl Decode<RegisterBufferCollectionArgs> for RegisterBufferCollectionArgs
source§impl Default for RegisterBufferCollectionArgs
impl Default for RegisterBufferCollectionArgs
source§fn default() -> RegisterBufferCollectionArgs
fn default() -> RegisterBufferCollectionArgs
source§impl Encode<RegisterBufferCollectionArgs> for &mut RegisterBufferCollectionArgs
impl Encode<RegisterBufferCollectionArgs> for &mut RegisterBufferCollectionArgs
source§impl PartialEq for RegisterBufferCollectionArgs
impl PartialEq for RegisterBufferCollectionArgs
source§fn eq(&self, other: &RegisterBufferCollectionArgs) -> bool
fn eq(&self, other: &RegisterBufferCollectionArgs) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ResourceTypeMarker for RegisterBufferCollectionArgs
impl ResourceTypeMarker for RegisterBufferCollectionArgs
§type Borrowed<'a> = &'a mut RegisterBufferCollectionArgs
type Borrowed<'a> = &'a mut RegisterBufferCollectionArgs
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moresource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).source§impl TypeMarker for RegisterBufferCollectionArgs
impl TypeMarker for RegisterBufferCollectionArgs
§type Owned = RegisterBufferCollectionArgs
type Owned = RegisterBufferCollectionArgs
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.