blob: 66b7b0cfc1f01545cd04f7326b587e49417914da [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.sysmem;
using zx;
// TODO(fxbug.dev/32119): change struct to table
/// Information about a buffer collection and its buffers.
@for_deprecated_c_bindings
type BufferCollectionInfo = resource struct {
/// The number of buffers in the collection.
buffer_count uint32;
/// Describes how the contents of buffers are represented.
/// All buffers within the collection have the same format.
format BufferFormat;
/// VMO handles for each buffer in the collection.
/// The VMOs are only present when the buffers are backed by VMOs.
///
/// If present, all the VMOs after `buffer_count` are invalid handles.
/// All buffer VMO handles have identical size and access rights.
/// The VMO access rights are determined based on the usages which the
/// client specified when allocating the buffer collection. For example,
/// a client which expressed a read-only usage will receive VMOs without
/// write rights.
vmos array<zx.handle:<VMO, optional>, 64>;
/// The size of each VMO provided.
/// This property is only present when the buffers are backed by VMOs.
@allow_deprecated_struct_defaults
vmo_size uint64 = 0;
};