mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Added safety clarification to create_surface
This clarifies that the window that a surface is created on must be kept alive for the lifetime of the surface. This requirement and a proposal to change it are described in https://github.com/gfx-rs/wgpu/issues/1463
This commit is contained in:
@@ -1454,7 +1454,8 @@ impl Instance {
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// - Raw Window Handle must be a valid object to create a surface upon.
|
||||
/// - Raw Window Handle must be a valid object to create a surface upon and
|
||||
/// must remain valid for the lifetime of the returned surface.
|
||||
pub unsafe fn create_surface<W: raw_window_handle::HasRawWindowHandle>(
|
||||
&self,
|
||||
window: &W,
|
||||
|
||||
Reference in New Issue
Block a user