pub struct MultiFrame<'render, 'target, 'frame, 'buffer, R, T: GraphicsApi>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
'buffer: 'frame,{ /* private fields */ }Available on crate feature
renderer_multi only.Expand description
Frame implementation of a MultiRenderer.
Leaking the frame will potentially keep it from doing necessary copies
of the internal framebuffer for some multi-gpu configurations. The result would
be no updated framebuffer contents.
Additionally, all problems related to the Frame-implementation of the underlying
GraphicsApi will be present.
Trait Implementations§
Source§impl<'frame, 'buffer, R, T: GraphicsApi> AsMut<<<<R as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>> for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
'buffer: 'frame,
impl<'frame, 'buffer, R, T: GraphicsApi> AsMut<<<<R as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>> for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
'buffer: 'frame,
Source§impl<'frame, 'buffer, R, T: GraphicsApi> AsRef<<<<R as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>> for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
'buffer: 'frame,
impl<'frame, 'buffer, R, T: GraphicsApi> AsRef<<<<R as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>> for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
'buffer: 'frame,
Source§impl<'frame, 'buffer, R, T: GraphicsApi> BlitFrame<MultiFramebuffer<'buffer, R, T>> for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>: BlitFrame<<<R::Device as ApiDevice>::Renderer as RendererSuper>::Framebuffer<'buffer>>,
<T::Device as ApiDevice>::Renderer: Blit + ImportDma + ImportMem,
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: Bind<Dmabuf> + ExportMem + ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Clone + Send,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
impl<'frame, 'buffer, R, T: GraphicsApi> BlitFrame<MultiFramebuffer<'buffer, R, T>> for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>: BlitFrame<<<R::Device as ApiDevice>::Renderer as RendererSuper>::Framebuffer<'buffer>>,
<T::Device as ApiDevice>::Renderer: Blit + ImportDma + ImportMem,
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: Bind<Dmabuf> + ExportMem + ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Clone + Send,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
Source§fn blit_to(
&mut self,
to: &mut MultiFramebuffer<'buffer, R, T>,
src: Rectangle<i32, Physical>,
dst: Rectangle<i32, Physical>,
filter: TextureFilter,
) -> Result<(), Self::Error>
fn blit_to( &mut self, to: &mut MultiFramebuffer<'buffer, R, T>, src: Rectangle<i32, Physical>, dst: Rectangle<i32, Physical>, filter: TextureFilter, ) -> Result<(), Self::Error>
Copies the contents of the bound framebuffer to
dst in the provided framebuffer,
applying filter if necessary. Read moreSource§fn blit_from(
&mut self,
from: &MultiFramebuffer<'buffer, R, T>,
src: Rectangle<i32, Physical>,
dst: Rectangle<i32, Physical>,
filter: TextureFilter,
) -> Result<(), Self::Error>
fn blit_from( &mut self, from: &MultiFramebuffer<'buffer, R, T>, src: Rectangle<i32, Physical>, dst: Rectangle<i32, Physical>, filter: TextureFilter, ) -> Result<(), Self::Error>
Copies the contents of the provided framebuffer to
dst in the bound framebuffer,
applying filter if necessary. Read moreSource§impl<'frame, 'buffer, R, T: GraphicsApi> Debug for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
R: 'static + GraphicsApi + 'frame,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Debug,
R::Device: Debug,
T::Device: Debug,
'buffer: 'frame,
impl<'frame, 'buffer, R, T: GraphicsApi> Debug for MultiFrame<'_, '_, 'frame, 'buffer, R, T>where
R: 'static + GraphicsApi + 'frame,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Debug,
R::Device: Debug,
T::Device: Debug,
'buffer: 'frame,
Source§impl<R, T: GraphicsApi> Drop for MultiFrame<'_, '_, '_, '_, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
impl<R, T: GraphicsApi> Drop for MultiFrame<'_, '_, '_, '_, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
Source§impl<R, T: GraphicsApi> Frame for MultiFrame<'_, '_, '_, '_, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Clone + Send,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
impl<R, T: GraphicsApi> Frame for MultiFrame<'_, '_, '_, '_, R, T>where
R: 'static + GraphicsApi,
R::Error: 'static,
T::Error: 'static,
<R::Device as ApiDevice>::Renderer: ExportMem + ImportDma + ImportMem,
<T::Device as ApiDevice>::Renderer: ImportDma + ImportMem,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Clone + Send,
<<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
<<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static,
Source§type TextureId = MultiTexture
type TextureId = MultiTexture
Texture Handle type used by this renderer.
Source§fn context_id(&self) -> ContextId<MultiTexture>
fn context_id(&self) -> ContextId<MultiTexture>
Returns the
ContextId of the associated renderer.Source§fn clear(
&mut self,
color: Color32F,
at: &[Rectangle<i32, Physical>],
) -> Result<(), Error<R, T>>
fn clear( &mut self, color: Color32F, at: &[Rectangle<i32, Physical>], ) -> Result<(), Error<R, T>>
Clear the complete current target with a single given color. Read more
Source§fn draw_solid(
&mut self,
dst: Rectangle<i32, Physical>,
damage: &[Rectangle<i32, Physical>],
color: Color32F,
) -> Result<(), Self::Error>
fn draw_solid( &mut self, dst: Rectangle<i32, Physical>, damage: &[Rectangle<i32, Physical>], color: Color32F, ) -> Result<(), Self::Error>
Draw a solid color to the current target at the specified destination with the specified color.
Source§fn render_texture_from_to(
&mut self,
texture: &MultiTexture,
src: Rectangle<f64, BufferCoords>,
dst: Rectangle<i32, Physical>,
damage: &[Rectangle<i32, Physical>],
opaque_regions: &[Rectangle<i32, Physical>],
src_transform: Transform,
alpha: f32,
) -> Result<(), Error<R, T>>
fn render_texture_from_to( &mut self, texture: &MultiTexture, src: Rectangle<f64, BufferCoords>, dst: Rectangle<i32, Physical>, damage: &[Rectangle<i32, Physical>], opaque_regions: &[Rectangle<i32, Physical>], src_transform: Transform, alpha: f32, ) -> Result<(), Error<R, T>>
Render part of a texture as given by src to the current target into the rectangle described by dst
as a flat 2d-plane after applying the inverse of the given transformation.
(Meaning
src_transform should match the orientation of surface being rendered).Source§fn transformation(&self) -> Transform
fn transformation(&self) -> Transform
Output transformation that is applied to this frame
Source§fn wait(&mut self, sync: &SyncPoint) -> Result<(), Self::Error>
fn wait(&mut self, sync: &SyncPoint) -> Result<(), Self::Error>
Wait for a
SyncPoint to be signaledSource§fn render_texture_at(
&mut self,
texture: &Self::TextureId,
pos: Point<i32, Physical>,
texture_scale: i32,
output_scale: impl Into<Scale<f64>>,
src_transform: Transform,
damage: &[Rectangle<i32, Physical>],
opaque_regions: &[Rectangle<i32, Physical>],
alpha: f32,
) -> Result<(), Self::Error>
fn render_texture_at( &mut self, texture: &Self::TextureId, pos: Point<i32, Physical>, texture_scale: i32, output_scale: impl Into<Scale<f64>>, src_transform: Transform, damage: &[Rectangle<i32, Physical>], opaque_regions: &[Rectangle<i32, Physical>], alpha: f32, ) -> Result<(), Self::Error>
Render a texture to the current target as a flat 2d-plane at a given
position and applying the given transformation with the given alpha value.
(Meaning
src_transform should match the orientation of surface being rendered).Auto Trait Implementations§
impl<'render, 'target, 'frame, 'buffer, R, T> Freeze for MultiFrame<'render, 'target, 'frame, 'buffer, R, T>where
<<<R as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>: Freeze,
<<<T as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Freeze,
impl<'render, 'target, 'frame, 'buffer, R, T> !RefUnwindSafe for MultiFrame<'render, 'target, 'frame, 'buffer, R, T>
impl<'render, 'target, 'frame, 'buffer, R, T> !Send for MultiFrame<'render, 'target, 'frame, 'buffer, R, T>
impl<'render, 'target, 'frame, 'buffer, R, T> !Sync for MultiFrame<'render, 'target, 'frame, 'buffer, R, T>
impl<'render, 'target, 'frame, 'buffer, R, T> Unpin for MultiFrame<'render, 'target, 'frame, 'buffer, R, T>where
<<<R as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>: Unpin,
<<<T as GraphicsApi>::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Unpin,
impl<'render, 'target, 'frame, 'buffer, R, T> !UnwindSafe for MultiFrame<'render, 'target, 'frame, 'buffer, R, T>
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.