blob: ec9ecfcb204d9befebd772be2c2137bebca3cbed [file] [log] [blame]
// Copyright 2024 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.engine;
/// Type of the internal value in [`ImageId`].
alias ImageIdValue = uint64;
/// Unique identifier for an image registered with a display engine driver.
///
/// [`INVALID_ID`] represents an invalid value.
///
/// Valid values uniquely identify "live" images within a display engine driver
/// connection. The identifier of an image destroyed via [`Engine.ReleaseImage`]
/// can be reused as the return value of a subsequent [`Engine.ImportImage`]
/// call.
type ImageId = struct {
value ImageIdValue;
};
const INVALID_ID uint64 = 0;
/// Type of the internal value in [`BufferCollectionId`].
alias BufferCollectionIdValue = uint64;
/// Identifies a sysmem BufferCollection owned by a display engine driver.
///
/// Each value uniquely identifies a [`fuchsia.sysmem/BufferCollection`] (as
/// well as its token [`fuchsia.sysmem/BufferCollectionToken`]) owned by a
/// display engine driver. The identifier of a BufferCollection destroyed via
/// [`Engine.ReleaseBufferCollection`] can be reused in a subsequent
/// [`Engine.ImportBufferCollection`] call.
type BufferCollectionId = struct {
value BufferCollectionIdValue;
};
/// Identifies a single buffer within a sysmem BufferCollection owned by a
/// display engine driver.
///
/// A [`fuchsia.sysmem/BufferCollection`] may allocate multiple buffers at a
/// time. This identifies a specific buffer of `index` within the shared
/// BufferCollection identified by `collection_id`.
type BufferId = struct {
buffer_collection_id BufferCollectionId;
buffer_index uint32;
};