[rs] Note that get_next_texture will error if a previous output is still alive.

This commit is contained in:
Lachlan Sneff
2020-03-20 14:33:29 -04:00
parent af7a4282f2
commit ac7809cdcb

View File

@@ -1479,7 +1479,8 @@ impl SwapChain {
/// When the [`SwapChainOutput`] returned by this method is dropped, the swapchain will present
/// the texture to the associated [`Surface`].
///
/// Returns an `Err` if the GPU timed out when attempting to acquire the next texture.
/// Returns an `Err` if the GPU timed out when attempting to acquire the next texture or if a
/// previous output is still alive.
pub fn get_next_texture(&mut self) -> Result<SwapChainOutput, ()> {
let output = wgn::wgpu_swap_chain_get_next_texture(self.id);
if output.view_id == wgc::id::Id::ERROR {