Sitelet https://github.com/gpuweb/gpuweb/pull/262/files
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion design/ErrorHandling.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Instead, `GPUCommandEncoder.finish` returns an invalid object and generates an e
#### Promise-Returning

- `GPUDevice.createBufferMappedAsync`
- `GPUDevice.getSwapChainPreferredFormat`
- `GPUCanvasContext.getSwapChainPreferredFormat`
- `GPUFence.onCompletion`
- `GPUBuffer.mapReadAsync`
- `GPUBuffer.mapWriteAsync`
Expand Down
15 changes: 7 additions & 8 deletions design/sketch.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,16 @@ interface GPUQueue {
};

// SwapChain / CanvasContext
interface GPUCanvasContext {
partial interface GPUCanvasContext {
// Calling configureSwapChain a second time invalidates the previous one,
// and all of the textures it’s produced.
GPUSwapChain configureSwapChain(GPUSwapChainDescriptor descriptor);

Promise<GPUTextureFormat> getSwapChainPreferredFormat(GPUDevice device);
};

dictionary GPUSwapChainDescriptor {
required GPUCanvasContext context;
required GPUDevice device;
required GPUTextureFormat format;
GPUTextureUsageFlags usage = GPUTextureUsage.OUTPUT_ATTACHMENT;
};
Expand Down Expand Up @@ -731,13 +736,7 @@ interface GPUDevice {

GPUCommandEncoder createCommandEncoder(GPUCommandEncoderDescriptor descriptor);

// Calling createSwapChain a second time for the same GPUCanvasContext
// invalidates the previous one, and all of the textures it’s produced.
GPUSwapChain createSwapChain(GPUSwapChainDescriptor descriptor);

GPUQueue getQueue();

Promise<GPUTextureFormat> getSwapChainPreferredFormat(GPUCanvasContext context);
};

dictionary GPUDeviceDescriptor {
Expand Down