1// Copyright 2018 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5library fuchsia.sysmem; 6 7// Information about a buffer collection and its buffers. 8// TODO(ZX-2260): change struct to table 9struct BufferCollectionInfo { 10 // The number of buffers in the collection. 11 uint32 buffer_count; 12 13 // Describes how the contents of buffers are represented. 14 // All buffers within the collection have the same format. 15 BufferFormat format; 16 17 // VMO handles for each buffer in the collection. 18 // The VMOs are only present when the buffers are backed by VMOs. 19 // 20 // If present, all the VMOs after |buffer_count| are invalid handles. 21 // All buffer VMO handles have identical size and access rights. 22 // The VMO access rights are determined based on the usages which the 23 // client specified when allocating the buffer collection. For example, 24 // a client which expressed a read-only usage will receive VMOs without 25 // write rights. 26 array<handle<vmo>?>:64 vmos; 27 28 // The size of each VMO provided. 29 // This property is only present when the buffers are backed by VMOs. 30 uint64 vmo_size = 0; 31}; 32