pub(crate) fn take_drawable(&self, index: w::SwapImageIndex) -> Result<metal::Drawable, ()> {
        let mut frame = self.frames[index as usize].inner.lock();
        assert!(!frame.available && frame.linked);
        frame.signpost = None;

        match frame.drawable.take() {
            Some(drawable) => {
                debug!("Making frame {} available again", index);
                frame.available = true;
                Ok(drawable)
            }
            None => {
                warn!("Failed to get the drawable of frame {}", index);
                frame.linked = false;
                Err(())
            }
        }
    }
/// Returns the drawable for the specified swapchain image index,
/// marks the index as free for future use.
Returns the drawable for the specified swapchain image index,
marks the index as free for future use.
Returns the drawable for the specified swapchain image index marks the index as free for future use .
pub(crate) fn take_drawable(&self, index: w::SwapImageIndex) -> Result<metal::Drawable, ()> {
        let mut frame = self.frames[index as usize].inner.lock();
        assert!(!frame.available && frame.linked);
        frame.signpost = None;
        match frame.drawable.take() {
            Some(drawable) => {
                debug!("Making frame {} available again", index);
                frame.available = true;
                Ok(drawable)
            }
            None => {
                warn!("Failed to get the drawable of frame {}", index);
                frame.linked = false;
                Err(())
            }
        }
    }
pub ( crate ) fn take_drawable ( & self , index : w :: SwapImageIndex ) -> Result < metal :: Drawable , ( ) > { let mut frame = self . frames [ index as usize ] . inner . lock ( ) ; assert ! ( frame available frame linked ) ; frame . signpost = None ; match frame . drawable . take ( ) { Some ( drawable ) => { debug ! ( " " index ) ; frame . available = true ; Ok ( drawable ) } None => { warn ! ( " " index ) ; frame . linked = false ; Err ( ( ) ) } } }
Returns the drawable for the specified swapchain image index,
marks the index as free for future use.
Returns the drawable for the specified swapchain image index marks the index as free for future use .
&self
index
w::SwapImageIndex
&self
index
w::SwapImageIndex