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
This commit is contained in:
Jinlei Li authored and GitHub committed 2022-08-20 07:14:57 -07:00
1 parent c6ca2a7d0d
commit a08ea2a255
2 files changed
+4

No files matched your search

+3
View File
@@ -68,6 +68,9 @@ the same every time it is rendered, we now warn if it is missing.
- 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)
- Fixed opening of RenderDoc library by @abuffseagull in [#2930](https://github.com/gfx-rs/wgpu/pull/2930)
#### Metal
- Add the missing `msg_send![view, retain]` call within `from_view` by @jinleili in [#2976](https://github.com/gfx-rs/wgpu/pull/2976)
### Changes
#### General
+1
View File
@@ -86,6 +86,7 @@ impl super::Surface {
let render_layer =
mem::transmute::<_, &mtl::MetalLayerRef>(Self::get_metal_layer(view, delegate))
.to_owned();
let _: *mut c_void = msg_send![view, retain];
Self::new(NonNull::new(view), render_layer)
}