blob: a095c044ef4c9dfc776a905271e134218b1e1ade [file] [log] [blame]
// Copyright 2023 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.hardware.display;
/// Type of the internal value in [`fuchsia.hardware.display/BufferCollectionId`].
alias BufferCollectionIdValue = uint64;
/// Identifies a sysmem BufferCollection owned by a Display Coordinator client.
///
/// Values are managed by [`fuchsia.hardware.display/Coordinator`] clients, to
/// facilitate feed-forward dataflow.
///
/// Each value uniquely identifies a [`fuchsia.sysmem/BufferCollection`] (as
/// well as its token [`fuchsia.sysmem/BufferCollectionToken`]) imported to the
/// Display Coordinator device within a Coordinator connection. The identifier
/// of a BufferCollection destroyed via
/// [`fuchsia.hardware.display/Coordinator.ReleaseBufferCollection`] can be
/// reused in a subsequent
/// [`fuchsia.hardware.display/Coordinator.ImportBufferCollection`] call.
type BufferCollectionId = struct {
value BufferCollectionIdValue;
};
/// Identifies a single buffer within a sysmem BufferCollection owned by a
/// Display Coordinator client.
///
/// A [`fuchsia.sysmem/BufferCollection`] may allocate multiple buffers at a
/// time. This identifies the specific buffer at `buffer_index` within the
/// shared BufferCollection identified by `buffer_collection_id`.
type BufferId = struct {
buffer_collection_id BufferCollectionId;
buffer_index uint32;
};