render: support shm screencopy from direct scanout
This commit is contained in:
parent
9de63bddf3
commit
9fba5f9b45
13 changed files with 203 additions and 62 deletions
|
|
@ -255,4 +255,17 @@ impl GfxContext for GlRenderContext {
|
|||
fn gfx_api(&self) -> GfxApi {
|
||||
GfxApi::OpenGl
|
||||
}
|
||||
|
||||
fn create_fb(
|
||||
self: Rc<Self>,
|
||||
width: i32,
|
||||
height: i32,
|
||||
_stride: i32,
|
||||
format: &'static Format,
|
||||
) -> Result<Rc<dyn GfxFramebuffer>, GfxError> {
|
||||
let fb = self.ctx.with_current(|| unsafe {
|
||||
GlRenderBuffer::new(&self.ctx, width, height, format)?.create_framebuffer()
|
||||
})?;
|
||||
Ok(Rc::new(Framebuffer { ctx: self, gl: fb }))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue