Skip to content

Commit

Permalink
Fixing wasm32
Browse files Browse the repository at this point in the history
  • Loading branch information
gents83 committed Aug 27, 2023
1 parent 4f1bcab commit 969e411
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,13 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
.gl
.as_ref()
.map(|inst| {
let raw_surface = inst.create_surface_from_canvas(canvas)?;
Ok(HalSurface {
raw: Arc::new(inst.create_surface_from_canvas(canvas)?),
raw: Arc::new(raw_surface),
})
})
.transpose()?;
.transpose()?
.unwrap();
AnySurface::new(hal_surface)
},
};
Expand Down Expand Up @@ -624,11 +626,13 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
.gl
.as_ref()
.map(|inst| {
let raw_surface = inst.create_surface_from_offscreen_canvas(canvas)?;
Ok(HalSurface {
raw: Arc::new(inst.create_surface_from_offscreen_canvas(canvas)?),
raw: Arc::new(raw_surface),
})
})
.transpose()?;
.transpose()?
.unwrap();
AnySurface::new(hal_surface)
},
};
Expand Down

0 comments on commit 969e411

Please sign in to comment.