mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 09:21:04 +01:00
Make Surface::as_hal take an immutable reference. (#6500)
This commit is contained in:
1 parent
5936fe58f4
commit
9b47b06a4f
2 files changed
+5
-1
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user