blob: 3471dead5d75e34ae9dbeeed36b981426247f8f9 [file]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module gpu.mojom;
import "gpu/ipc/common/mailbox.mojom";
import "gpu/ipc/common/shared_image_metadata.mojom";
import "gpu/ipc/common/sync_token.mojom";
import "ui/gfx/mojom/buffer_types.mojom";
// gpu::SharedImageExportResult
struct SharedImageExportResult {
gpu.mojom.SyncToken sync_token;
};
// gpu::ExportedSharedImage
struct ExportedSharedImage {
gpu.mojom.Mailbox mailbox;
gpu.mojom.SharedImageMetadata metadata;
gpu.mojom.SyncToken creation_sync_token;
string debug_label;
// Optional params as they are only needed when passed over VideoFrame
// GpuMemoryBuffers for exporting/importing mappable shared images.
// For other cases, when exporting/importing ClientSharedImage,
// passing these params is not needed.
gfx.mojom.GpuMemoryBufferHandle? buffer_handle;
gfx.mojom.BufferUsage? buffer_usage;
// Necessary to allow the ClientSharedImage that is created from this
// ExportedSharedImage to use the correct GL texture target.
uint32 texture_target;
bool is_software;
};