Skip to content

Commit a08ea2a

Browse files
authored
metal: add the missing msg_send![view, retain] call within from_view (#2976)
* metal: add the missing `msg_send![view, retain]` call within `from_view` * Update CHANGELOG
1 parent c6ca2a7 commit a08ea2a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ the same every time it is rendered, we now warn if it is missing.
6868
- Fix compilation errors when using wgpu-core in isolation while targetting `wasm32-unknown-unknown` by @Seamooo in [#2922](https://github.com/gfx-rs/wgpu/pull/2922)
6969
- Fixed opening of RenderDoc library by @abuffseagull in [#2930](https://github.com/gfx-rs/wgpu/pull/2930)
7070

71+
#### Metal
72+
- Add the missing `msg_send![view, retain]` call within `from_view` by @jinleili in [#2976](https://github.com/gfx-rs/wgpu/pull/2976)
73+
7174
### Changes
7275

7376
#### General

wgpu-hal/src/metal/surface.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ impl super::Surface {
8686
let render_layer =
8787
mem::transmute::<_, &mtl::MetalLayerRef>(Self::get_metal_layer(view, delegate))
8888
.to_owned();
89+
let _: *mut c_void = msg_send![view, retain];
8990
Self::new(NonNull::new(view), render_layer)
9091
}
9192

0 commit comments

Comments
 (0)