Repository navigation
Closed
Labels
A-content/webgpuThe WebGPU implementation.
Description
Currently response sender has this type: IpcSender<Option<WebGPUResponseResult>>, where
| pub type WebGPUResponseResult = Result<WebGPUResponse, String>; |
Option is None only when dom.webgpu.enabled is disabled (introduced in #31002), instead we can pack None value into as WebGPUResponse::NoWebGPU variant.
Result errors only in RequestDevice or RequestAdapter in other cases we already use result in variant (we need limited errors and it's nice know which request are we resolving):
| PoppedErrorScope(Result<Option<Error>, PopError>), |
Result and replacing it with results in variants (this will require named struct for all data inside: servo/components/webgpu/ipc_messages/to_dom.rs
Lines 60 to 66 in 91ca727
| RequestAdapter { | |
| adapter_info: wgt::AdapterInfo, | |
| adapter_id: WebGPUAdapter, | |
| features: wgt::Features, | |
| limits: wgt::Limits, | |
| channel: WebGPU, | |
| }, |
Does that sounds reasonable @gterzian?
Metadata
Metadata
Assignees
Labels
A-content/webgpuThe WebGPU implementation.
Type
Projects
- StatusShow more project fieldsDone
Activity
gterzian commentedon Jul 16, 2024
Yes