PWebGPU.ipdl (2657B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: sw=2 ts=8 et : 3 */ 4 /* This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 8 using mozilla::layers::RGBDescriptor from "mozilla/layers/LayersSurfaces.h"; 9 using mozilla::layers::RemoteTextureId from "mozilla/layers/LayersTypes.h"; 10 using mozilla::layers::RemoteTextureOwnerId from "mozilla/layers/LayersTypes.h"; 11 using mozilla::layers::RemoteTextureTxnType from "mozilla/layers/LayersTypes.h"; 12 using mozilla::layers::RemoteTextureTxnId from "mozilla/layers/LayersTypes.h"; 13 using mozilla::webgpu::RawId from "mozilla/webgpu/WebGPUTypes.h"; 14 using mozilla::dom::GPUErrorFilter from "mozilla/dom/WebGPUBinding.h"; 15 using mozilla::dom::GPURequestAdapterOptions from "mozilla/dom/WebGPUBinding.h"; 16 using mozilla::dom::GPUCommandBufferDescriptor from "mozilla/dom/WebGPUBinding.h"; 17 using mozilla::dom::GPUBufferDescriptor from "mozilla/dom/WebGPUBinding.h"; 18 using mozilla::webgpu::ExternalTextureSourceDescriptor from "mozilla/webgpu/WebGPUTypes.h"; 19 using mozilla::webgpu::PopErrorScopeResult from "mozilla/webgpu/WebGPUTypes.h"; 20 using mozilla::webgpu::WebGPUCompilationMessage from "mozilla/webgpu/WebGPUTypes.h"; 21 [MoveOnly] using mozilla::ipc::MutableSharedMemoryHandle from "mozilla/ipc/SharedMemoryHandle.h"; 22 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h"; 23 24 include "mozilla/ipc/ByteBufUtils.h"; 25 include "mozilla/layers/LayersMessageUtils.h"; 26 include "mozilla/webgpu/WebGPUSerialize.h"; 27 include "mozilla/layers/WebRenderMessageUtils.h"; 28 include protocol PCanvasManager; 29 include PWebGPUTypes; 30 31 namespace mozilla { 32 namespace webgpu { 33 34 /** 35 * Represents the connection between a WebGPUChild actor that issues WebGPU 36 * command from the content process, and a WebGPUParent in the compositor 37 * process that runs the commands. 38 */ 39 async protocol PWebGPU 40 { 41 manager PCanvasManager; 42 43 parent: 44 async Messages(uint32_t nrOfMessages, ByteBuf serializedMessages, ByteBuf[] dataBuffers, MutableSharedMemoryHandle[] shmems); 45 46 // Ideally this would be sent in Messages(), but we need to implement 47 // SurfaceDescriptor serialization first. 48 async CreateExternalTextureSource( 49 RawId deviceId, 50 RawId queueId, 51 RawId externalTextureSourceId, 52 ExternalTextureSourceDescriptor aDesc 53 ); 54 55 56 child: 57 async ServerMessage(ByteBuf buf); 58 59 async UncapturedError(RawId aDeviceId, nsCString message); 60 async DeviceLost(RawId aDeviceId, uint8_t reason, nsCString message); 61 async __delete__(); 62 }; 63 64 } // webgpu 65 } // mozilla