Less nesting in webgpu response (#32799)

* Remove Option wrap of WebGPUResponse

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Replace WebGPUResponseResult with WebGPUResponse

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-07-17 22:37:52 +02:00 committed by GitHub
parent 1223335547
commit 34eed29037
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 196 additions and 214 deletions

View file

@ -24,7 +24,7 @@ use serde::{Deserialize, Serialize};
use servo_url::{ImmutableOrigin, ServoUrl};
use smallvec::SmallVec;
use style_traits::CSSPixel;
use webgpu::{wgc, WebGPU, WebGPUResponseResult};
use webgpu::{wgc, WebGPU, WebGPUResponse};
use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
use crate::{
@ -257,7 +257,7 @@ pub enum ScriptMsg {
MediaSessionEvent(PipelineId, MediaSessionEvent),
/// Create a WebGPU Adapter instance
RequestAdapter(
IpcSender<Option<WebGPUResponseResult>>,
IpcSender<WebGPUResponse>,
wgc::instance::RequestAdapterOptions,
SmallVec<[wgc::id::AdapterId; 4]>,
),