1
0
Fork 0
forked from wry/wry

video: render hardware cursor in screencasts

This commit is contained in:
Julian Orth 2024-02-16 19:12:50 +01:00
parent d4fc672fb3
commit 4d8e744c2f
4 changed files with 86 additions and 10 deletions

View file

@ -202,7 +202,12 @@ impl WlOutputGlobal {
Ok(())
}
pub fn perform_screencopies(&self, fb: &dyn GfxFramebuffer, tex: &Rc<dyn GfxTexture>) {
pub fn perform_screencopies(
&self,
fb: &dyn GfxFramebuffer,
tex: &Rc<dyn GfxTexture>,
render_hardware_cursors: bool,
) {
if self.pending_captures.is_empty() {
return;
}
@ -278,7 +283,15 @@ impl WlOutputGlobal {
continue;
}
};
fb.copy_texture(tex, -capture.rect.x1(), -capture.rect.y1());
self.state.perform_screencopy(
tex,
&fb,
self.preferred_scale.get(),
self.pos.get(),
render_hardware_cursors,
-capture.rect.x1(),
-capture.rect.y1(),
);
}
if capture.with_damage.get() {
capture.send_damage();