Skip to content

Commit

Permalink
metal: add the missing msg_send![view, retain] call within `from_vi…
Browse files Browse the repository at this point in the history
…ew` (#2976)

* metal: add the missing `msg_send![view, retain]` call within `from_view`

* Update CHANGELOG
  • Loading branch information
jinleili authored Aug 20, 2022
1 parent c6ca2a7 commit a08ea2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions wgpu-hal/src/metal/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit a08ea2a

Please sign in to comment.