pub struct BatchFrame { /* private fields */ }Expand description
One view’s worth of atlas draws: the sprite rows for this frame plus the
shared atlas uploads. Each scene node owns its frame, so several views can
batch from one atlas without sharing (and clobbering) one batch; the pixel
data itself rides an Arc and is never cloned.
Implementations§
Source§impl BatchFrame
impl BatchFrame
pub fn new(batch: SpriteBatch, uploads: Arc<[AtlasUpload]>) -> BatchFrame
pub fn node(self, rect: Rect) -> SceneNode
Trait Implementations§
Source§impl WgpuCallback for BatchFrame
impl WgpuCallback for BatchFrame
fn resource_key(&self) -> Option<&str>
Source§fn prepare(
&self,
device: &Device,
queue: &Queue,
encoder: &mut CommandEncoder,
screen: &ScreenDescriptor,
resources: &mut CallbackResources,
) -> Vec<CommandBuffer>
fn prepare( &self, device: &Device, queue: &Queue, encoder: &mut CommandEncoder, screen: &ScreenDescriptor, resources: &mut CallbackResources, ) -> Vec<CommandBuffer>
Called before the main
repose render pass, with access to device/queue/encoder
for buffer uploads. Can return extra command buffers to be submitted.fn paint( &self, _info: PaintCallbackInfo, rpass: &mut CallbackRenderPass<'_, '_>, resources: &CallbackResources, )
fn resource_type_id(&self) -> TypeId
Source§fn finish_prepare(
&self,
_device: &Device,
_queue: &Queue,
_encoder: &mut CommandEncoder,
_screen_descriptor: &ScreenDescriptor,
_resources: &mut CallbackResources,
) -> Vec<CommandBuffer>
fn finish_prepare( &self, _device: &Device, _queue: &Queue, _encoder: &mut CommandEncoder, _screen_descriptor: &ScreenDescriptor, _resources: &mut CallbackResources, ) -> Vec<CommandBuffer>
Called after all
prepare calls, before paint. For cross-callback sync.Auto Trait Implementations§
impl Freeze for BatchFrame
impl RefUnwindSafe for BatchFrame
impl Send for BatchFrame
impl Sync for BatchFrame
impl Unpin for BatchFrame
impl UnsafeUnpin for BatchFrame
impl UnwindSafe for BatchFrame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.