renderer/glow: Implement `Blit`
@@ -13,8 +13,8 @@ use crate::{
allocator::{dmabuf::Dmabuf, Format},
egl::EGLContext,
renderer::{
- gles2::*, Bind, ExportDma, ExportMem, ImportDma, ImportMem, Offscreen, Renderer, TextureFilter,
- Unbind,
+ gles2::*, Bind, Blit, ExportDma, ExportMem, ImportDma, ImportMem, Offscreen, Renderer,
+ TextureFilter, Unbind,
},
},
utils::{Buffer as BufferCoord, Physical, Rectangle, Size, Transform},
@@ -386,6 +386,22 @@ where
}
}
+impl<B1, B2> Blit<B1, B2> for GlowRenderer
+where
+ Gles2Renderer: Blit<B1, B2>,
+{
+ fn blit(
+ &mut self,
+ from: B1,
+ to: B2,
+ src: Rectangle<i32, Physical>,
+ dst: Rectangle<i32, Physical>,
+ filter: TextureFilter,
+ ) -> Result<(), Gles2Error> {
+ self.gl.blit(from, to, src, dst, filter)
+ }
+}
+
impl Unbind for GlowRenderer {
fn unbind(&mut self) -> Result<(), <Self as Renderer>::Error> {
self.gl.unbind()
