pub fn process_finished_frame(&mut self) -> Option<Vec<GpuTimerScopeResult>> {
        let frame = self.pending_frames.first_mut()?;

        // We only process if all mappings succeed.
        if frame
            .query_pools
            .iter_mut()
            .any(|pool| block_on(poll_once(pool.buffer_mapping.as_mut().unwrap())).is_none())
        {
            return None;
        }

        let frame = self.pending_frames.remove(0);

        let results = {
            let resolved_query_buffers: Vec<wgpu::BufferView> = frame
                .query_pools
                .iter()
                .map(|pool| pool.resolved_buffer_slice().get_mapped_range())
                .collect();
            Self::process_timings_recursive(self.timestamp_to_sec, &resolved_query_buffers, frame.closed_scopes)
        };

        self.cache_unused_query_pools(frame.query_pools);

        Some(results)
    }
/// Checks if all timer queries for the oldest pending finished frame are done and returns that snapshot if any.
Checks if all timer queries for the oldest pending finished frame are done and returns that snapshot if any.
Checks if all timer queries for the oldest pending finished frame are done and returns that snapshot if any .
pub fn process_finished_frame(&mut self) -> Option<Vec<GpuTimerScopeResult>> {
        let frame = self.pending_frames.first_mut()?;
        // We only process if all mappings succeed.
        if frame
            .query_pools
            .iter_mut()
            .any(|pool| block_on(poll_once(pool.buffer_mapping.as_mut().unwrap())).is_none())
        {
            return None;
        }
        let frame = self.pending_frames.remove(0);
        let results = {
            let resolved_query_buffers: Vec<wgpu::BufferView> = frame
                .query_pools
                .iter()
                .map(|pool| pool.resolved_buffer_slice().get_mapped_range())
                .collect();
            Self::process_timings_recursive(self.timestamp_to_sec, &resolved_query_buffers, frame.closed_scopes)
        };
        self.cache_unused_query_pools(frame.query_pools);
        Some(results)
    }
pub fn process_finished_frame ( & mut self ) -> Option < Vec < GpuTimerScopeResult > > { let frame = self . pending_frames . first_mut ( ) ? ; // We only process if all mappings succeed. if frame . query_pools . iter_mut ( ) . any ( | pool | block_on ( poll_once ( pool . buffer_mapping . as_mut ( ) . unwrap ( ) ) ) . is_none ( ) ) { return None ; } let frame = self . pending_frames . remove ( 0 ) ; let results = { let resolved_query_buffers : Vec < wgpu :: BufferView > = frame . query_pools . iter ( ) . map ( | pool | pool . resolved_buffer_slice ( ) . get_mapped_range ( ) ) . collect ( ) ; Self :: process_timings_recursive ( self . timestamp_to_sec , & resolved_query_buffers , frame . closed_scopes ) } ; self . cache_unused_query_pools ( frame . query_pools ) ; Some ( results ) }
Checks if all timer queries for the oldest pending finished frame are done and returns that snapshot if any.
Checks if all timer queries for the oldest pending finished frame are done and returns that snapshot if any .
&mut self
&mut self