Blit

Trait Blit 

Source
pub trait Blit
where Self: Renderer,
{ // Required method fn blit( &mut self, from: &Self::Framebuffer<'_>, to: &mut Self::Framebuffer<'_>, src: Rectangle<i32, Physical>, dst: Rectangle<i32, Physical>, filter: TextureFilter, ) -> Result<SyncPoint, Self::Error>; }
Expand description

Trait for renderers supporting blitting contents from one framebuffer to another.

Required Methods§

Source

fn blit( &mut self, from: &Self::Framebuffer<'_>, to: &mut Self::Framebuffer<'_>, src: Rectangle<i32, Physical>, dst: Rectangle<i32, Physical>, filter: TextureFilter, ) -> Result<SyncPoint, Self::Error>

Copies the contents of src from one provided target to dst in the other provided target, applying filter if necessary.

This operation is non destructive, the contents of the source framebuffer are kept intact as is any region not in dst for the target framebuffer.

This function may fail, if (but not limited to):

  • The source framebuffer is not readable
  • The destination framebuffer is not writable
  • src is out of bounds for the source framebuffer
  • dst is out of bounds for the destination framebuffer
  • src and dst sizes are different and interpolation is not supported by this renderer.
  • source and target framebuffer are the same

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Blit for GlesRenderer

Available on crate feature renderer_gl only.
Source§

impl Blit for GlowRenderer

Available on crate feature renderer_glow only.
Source§

impl<'a, 'frame, 'buffer, R, T> Blit for LocalMultiRenderer<'a, '_, '_, 'frame, 'buffer, R, T>
where <R::Device as ApiDevice>::Renderer: Blit + ExportMem + ImportDma + ImportMem, R: 'static + GraphicsApi, T: 'static + GraphicsApi, R::Error: 'static, T::Error: 'static, <<R::Device as ApiDevice>::Renderer as RendererSuper>::TextureId: Clone + Send, <<R::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static, <T::Device as ApiDevice>::Renderer: ImportDma + ImportMem, <<T::Device as ApiDevice>::Renderer as RendererSuper>::Error: 'static, <<R::Device as ApiDevice>::Renderer as RendererSuper>::Frame<'frame, 'buffer>: FrameContext<'a, 'frame, 'buffer, <R::Device as ApiDevice>::Renderer>,

Available on crate feature renderer_multi only.
Source§

impl<R, T: GraphicsApi> Blit for MultiRenderer<'_, '_, R, T>
where <R::Device as ApiDevice>::Renderer: Blit + Bind<Dmabuf> + ExportMem + ImportDma + ImportMem, <T::Device as ApiDevice>::Renderer: Blit + ImportDma + ImportMem, R: 'static + GraphicsApi, R::Error: 'static, T::Error: 'static, <<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,

Available on crate feature renderer_multi only.