mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
Make Surface::as_hal
take an immutable reference. (#6500)
This commit is contained in:
parent
5936fe58f4
commit
9b47b06a4f
@ -54,6 +54,10 @@ Bottom level categories:
|
||||
|
||||
### Changes
|
||||
|
||||
#### General
|
||||
|
||||
- Make `Surface::as_hal` take an immutable reference to the surface. By @jerzywilczek in [#9999](https://github.com/gfx-rs/wgpu/pull/9999)
|
||||
|
||||
#### HAL
|
||||
|
||||
- Change the `DropCallback` API to use `FnOnce` instead of `FnMut`. By @jerzywilczek in [#6482](https://github.com/gfx-rs/wgpu/pull/6482)
|
||||
|
@ -159,7 +159,7 @@ impl Surface<'_> {
|
||||
/// - The raw handle obtained from the hal Surface must not be manually destroyed
|
||||
#[cfg(wgpu_core)]
|
||||
pub unsafe fn as_hal<A: wgc::hal_api::HalApi, F: FnOnce(Option<&A::Surface>) -> R, R>(
|
||||
&mut self,
|
||||
&self,
|
||||
hal_surface_callback: F,
|
||||
) -> Option<R> {
|
||||
self.context
|
||||
|
Loading…
Reference in New Issue
Block a user