| // Copyright 2019 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // https://gpuweb.github.io/gpuweb/ |
| |
| [ |
| Exposed=(Window, Worker), |
| SecureContext |
| ] interface GPUQueue { |
| [CallWith=ScriptState] void submit(sequence<GPUCommandBuffer> buffers); |
| |
| [CallWith=ScriptState] Promise<undefined> onSubmittedWorkDone(); |
| |
| [CallWith=ScriptState, RaisesException] void writeBuffer( |
| GPUBuffer buffer, |
| GPUSize64 bufferOffset, |
| [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView data, |
| optional GPUSize64 dataElementOffset = 0, |
| optional GPUSize64 dataElementCount); |
| [CallWith=ScriptState, RaisesException] void writeBuffer( |
| GPUBuffer buffer, |
| GPUSize64 bufferOffset, |
| [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBuffer data, |
| optional GPUSize64 dataByteOffset = 0, |
| optional GPUSize64 byteSize); |
| |
| [CallWith=ScriptState, RaisesException] void writeTexture( |
| GPUTexelCopyTextureInfo destination, |
| [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView data, |
| GPUTexelCopyBufferLayout dataLayout, |
| GPUExtent3D size); |
| [CallWith=ScriptState, RaisesException] void writeTexture( |
| GPUTexelCopyTextureInfo destination, |
| [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBuffer data, |
| GPUTexelCopyBufferLayout dataLayout, |
| GPUExtent3D size); |
| |
| [RaisesException] void copyExternalImageToTexture( |
| GPUImageCopyExternalImage source, |
| GPUImageCopyTextureTagged destination, |
| GPUExtent3D copySize); |
| }; |
| GPUQueue includes GPUObjectBase; |