MultiFrame

Struct MultiFrame 

Source
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,

Source§

fn as_mut( &mut self, ) -> &mut <<R::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>

Converts this type into a mutable reference of the (usually inferred) input type.
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,

Source§

fn as_ref( &self, ) -> &<<R::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>

Converts this type into a shared reference of the (usually inferred) input type.
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,

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>

Copies the contents of the bound framebuffer to dst in the provided framebuffer, applying filter if necessary. Read more
Source§

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 more
Source§

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§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
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,

Source§

type Error = Error<R, T>

Error type returned by the rendering operations of this renderer.
Source§

type TextureId = MultiTexture

Texture Handle type used by this renderer.
Source§

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>>

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>

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>>

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

Output transformation that is applied to this frame
Source§

fn wait(&mut self, sync: &SyncPoint) -> Result<(), Self::Error>

Wait for a SyncPoint to be signaled
Source§

fn finish(self) -> Result<SyncPoint, Self::Error>

Finish this Frame returning any error that may happen during any cleanup. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: 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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more