mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
webgpu: leverage routed_promise in calls returning promises (#35859)
Using the RoutedPromiseListener let us define a different response type for each promise. This removes unreachable branches that used to exist when they all shared the same WebGPUResponse. Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
4814cbdb1f
commit
1c9f486f88
15 changed files with 221 additions and 263 deletions
|
@ -24,7 +24,7 @@ use servo_url::{ImmutableOrigin, ServoUrl};
|
|||
use strum_macros::IntoStaticStr;
|
||||
use style_traits::CSSPixel;
|
||||
#[cfg(feature = "webgpu")]
|
||||
use webgpu::{WebGPU, WebGPUResponse, wgc};
|
||||
use webgpu::{WebGPU, WebGPUAdapterResponse, wgc};
|
||||
use webrender_api::ImageKey;
|
||||
|
||||
use crate::mem::MemoryReportResult;
|
||||
|
@ -204,7 +204,7 @@ pub enum ScriptMsg {
|
|||
#[cfg(feature = "webgpu")]
|
||||
/// Create a WebGPU Adapter instance
|
||||
RequestAdapter(
|
||||
IpcSender<WebGPUResponse>,
|
||||
IpcSender<WebGPUAdapterResponse>,
|
||||
wgc::instance::RequestAdapterOptions,
|
||||
wgc::id::AdapterId,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue