#[non_exhaustive]pub struct GpuFrameParts<'a> {
pub device: &'a Device,
pub queue: &'a Queue,
pub target: &'a TextureView,
pub format: TextureFormat,
pub width: u32,
pub height: u32,
pub scale: f32,
pub time: Duration,
pub encoder: &'a mut CommandEncoder,
pub events: &'a mut Vec<GpuEvent>,
}Expand description
What a frame is made of (GpuFrame::new).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.device: &'a DeviceThe device.
queue: &'a QueueIts queue.
target: &'a TextureViewWhere the frame is drawn.
format: TextureFormatThe target’s format.
width: u32The target’s width in pixels.
height: u32The target’s height in pixels.
scale: f32Pixels per point.
time: DurationSince the renderer was made.
encoder: &'a mut CommandEncoderWhat the frame is encoded with.
events: &'a mut Vec<GpuEvent>Where its events go.
Implementations§
Source§impl<'a> GpuFrameParts<'a>
impl<'a> GpuFrameParts<'a>
Sourcepub fn new(
device: &'a Device,
queue: &'a Queue,
target: &'a TextureView,
format: TextureFormat,
(width, height): (u32, u32),
scale: f32,
time: Duration,
encoder: &'a mut CommandEncoder,
events: &'a mut Vec<GpuEvent>,
) -> Self
pub fn new( device: &'a Device, queue: &'a Queue, target: &'a TextureView, format: TextureFormat, (width, height): (u32, u32), scale: f32, time: Duration, encoder: &'a mut CommandEncoder, events: &'a mut Vec<GpuEvent>, ) -> Self
The parts of a frame of width × height pixels at scale.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GpuFrameParts<'a>
impl<'a> !UnwindSafe for GpuFrameParts<'a>
impl<'a> Forget for GpuFrameParts<'a>
impl<'a> Freeze for GpuFrameParts<'a>
impl<'a> Move for GpuFrameParts<'a>
impl<'a> Send for GpuFrameParts<'a>where
&'a Device: Send,
&'a Queue: Send,
&'a TextureView: Send,
Arc<Global>: Send,
NonZero<u64>: Send,
Arc<Mutex<ErrorSinkRaw>>: Send,
Arc<Mutex<DeferredCommandBufferActions>>: Send,
RawVecInner: Send,
Arc<str>: Send,
NodeRef<Owned, String, Value, LeafOrInternal>: Send,
BoxRaw<(String, Value)>: Send,
impl<'a> Sync for GpuFrameParts<'a>where
Arc<CoreDevice>: Sync,
Arc<CoreQueue>: Sync,
Arc<CoreTextureView>: Sync,
Arc<CoreTexture>: Sync,
InternalBitFlags: Sync,
Arc<Global>: Sync,
NonZero<u64>: Sync,
Arc<Mutex<ErrorSinkRaw>>: Sync,
Arc<Mutex<DeferredCommandBufferActions>>: Sync,
RawVecInner: Sync,
Arc<str>: Sync,
NodeRef<Owned, String, Value, LeafOrInternal>: Sync,
BoxRaw<(String, Value)>: Sync,
impl<'a> Unpin for GpuFrameParts<'a>
impl<'a> UnsafeUnpin for GpuFrameParts<'a>where
&'a Device: UnsafeUnpin,
&'a Queue: UnsafeUnpin,
&'a TextureView: UnsafeUnpin,
&'a mut CommandEncoder: UnsafeUnpin,
&'a mut Vec<GpuEvent>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more