1
0
mirror of https://gitlab.com/marcandre.lureau/qemu-display.git synced 2025-03-07 15:25:04 +00:00

rdw: hook 2d drawing

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-04-14 18:28:58 +04:00
parent b87f460871
commit 697fb50c0f
2 changed files with 11 additions and 0 deletions

Binary file not shown.

View File

@ -150,8 +150,19 @@ mod imp {
log::debug!("Console event: {:?}", evt);
match evt {
Scanout(s) => {
if s.format != 0x20020888 {
log::warn!("Format not yet supported: {:X}", s.format);
return Continue(true);
}
widget.set_display_size(Some((s.width as _, s.height as _)));
widget.update_area(0, 0, s.width as _, s.height as _, s.stride as _, &s.data);
}
Update(u) => {
if u.format != 0x20020888 {
log::warn!("Format not yet supported: {:X}", u.format);
return Continue(true);
}
widget.update_area(u.x as _, u.y as _, u.w as _, u.h as _, u.stride as _, &u.data);
}
ScanoutDMABUF(s) => {
widget.set_display_size(Some((s.width as _, s.height as _)));