[rs] Remove lifetime from SwapChainOutput

This commit is contained in:
Lachlan Sneff
2020-03-19 11:43:38 -04:00
parent 5fa3a74061
commit af7a4282f2

View File

@@ -397,9 +397,9 @@ pub struct RenderPassDescriptor<'a, 'b> {
/// A swap chain image that can be rendered to.
#[derive(Debug)]
pub struct SwapChainOutput<'a> {
pub struct SwapChainOutput {
pub view: TextureView,
swap_chain_id: &'a wgc::id::SwapChainId,
swap_chain_id: wgc::id::SwapChainId,
}
/// A view of a buffer which can be used to copy to or from a texture.
@@ -1465,10 +1465,10 @@ impl Queue {
}
}
impl<'a> Drop for SwapChainOutput<'a> {
impl Drop for SwapChainOutput {
fn drop(&mut self) {
if !thread::panicking() {
wgn::wgpu_swap_chain_present(*self.swap_chain_id);
wgn::wgpu_swap_chain_present(self.swap_chain_id);
}
}
}
@@ -1490,7 +1490,7 @@ impl SwapChain {
id: output.view_id,
owned: false,
},
swap_chain_id: &self.id,
swap_chain_id: self.id,
})
}
}