Struct webgpu::swapchain::PresentationData
source · pub struct PresentationData {
device_id: DeviceId,
queue_id: QueueId,
data: Option<GPUPresentationBuffer>,
buffer_ids: ArrayVec<(BufferId, PresentationBufferState), PRESENTATION_BUFFER_COUNT>,
image_key: ImageKey,
image_desc: ImageDescriptor,
image_data: ImageData,
}
Fields§
§device_id: DeviceId
§queue_id: QueueId
§data: Option<GPUPresentationBuffer>
§buffer_ids: ArrayVec<(BufferId, PresentationBufferState), PRESENTATION_BUFFER_COUNT>
§image_key: ImageKey
§image_desc: ImageDescriptor
§image_data: ImageData
Implementations§
source§impl PresentationData
impl PresentationData
pub fn new( device_id: DeviceId, queue_id: QueueId, buffer_ids: ArrayVec<BufferId, PRESENTATION_BUFFER_COUNT>, image_key: ImageKey, image_desc: ImageDescriptor, image_data: ImageData, ) -> Self
fn dummy_data(&self) -> Vec<u8> ⓘ
fn buffer_stride(&self) -> i32
fn buffer_size(&self) -> BufferAddress
sourcefn get_available_buffer(&mut self, global: &Arc<Global>) -> Option<BufferId>
fn get_available_buffer(&mut self, global: &Arc<Global>) -> Option<BufferId>
Returns id of available buffer and sets state to PresentationBufferState::Mapping
fn get_buffer_state( &mut self, buffer_id: BufferId, ) -> &mut PresentationBufferState
fn unmap_old_buffer(&mut self, presentation_buffer: GPUPresentationBuffer)
Auto Trait Implementations§
impl Freeze for PresentationData
impl !RefUnwindSafe for PresentationData
impl Send for PresentationData
impl Sync for PresentationData
impl Unpin for PresentationData
impl !UnwindSafe for PresentationData
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more