| // Copyright 2018 The Chromium 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; |
| |
| // Information about a buffer collection and its buffers. |
| // TODO(ZX-2260): change struct to table |
| 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<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; |
| }; |