blob: 60cfa18673fb2d0842125ed0bd40a52e8001e948 [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;
/// Information about a buffer collection and its buffers.
// TODO(fxbug.dev/32119): change struct to table
[ForDeprecatedCBindings]
resource struct BufferCollectionInfo {
/// The number of buffers in the collection.
uint32 buffer_count;
/// Describes how the contents of buffers are represented.
/// All buffers within the collection have the same format.
BufferFormat format;
/// 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.
array<zx.handle:VMO?>:64 vmos;
/// The size of each VMO provided.
/// This property is only present when the buffers are backed by VMOs.
uint64 vmo_size = 0;
};