mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: fix warnings in various modules in components (#31568)
* clippy: fix warnings in various modules in components * fix: unit tests * fix: build on android * fix: all samplers use new_boxed
This commit is contained in:
parent
19f1f2a8f4
commit
3a5ca785d3
24 changed files with 107 additions and 118 deletions
|
@ -919,8 +919,8 @@ impl<'a> WGPU<'a> {
|
|||
pipeline_id,
|
||||
} => {
|
||||
let desc = DeviceDescriptor {
|
||||
label: descriptor.label.as_ref().map(|l| crate::Cow::from(l)),
|
||||
features: descriptor.features.clone(),
|
||||
label: descriptor.label.as_ref().map(crate::Cow::from),
|
||||
features: descriptor.features,
|
||||
limits: descriptor.limits.clone(),
|
||||
};
|
||||
let global = &self.global;
|
||||
|
@ -1336,20 +1336,12 @@ webgpu_resource!(WebGPUSurface, id::SurfaceId);
|
|||
webgpu_resource!(WebGPUTexture, id::TextureId);
|
||||
webgpu_resource!(WebGPUTextureView, id::TextureViewId);
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct WGPUExternalImages {
|
||||
pub images: Arc<Mutex<HashMap<u64, PresentationData>>>,
|
||||
pub locked_ids: HashMap<u64, Vec<u8>>,
|
||||
}
|
||||
|
||||
impl WGPUExternalImages {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
images: Arc::new(Mutex::new(HashMap::new())),
|
||||
locked_ids: HashMap::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WebrenderExternalImageApi for WGPUExternalImages {
|
||||
fn lock(&mut self, id: u64) -> (WebrenderImageSource, Size2D<i32>) {
|
||||
let size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue