]> git.proxmox.com Git - mirror_qemu.git/commit - hw/display/vga.c
vga: optimize computation of dirty memory region
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Apr 2024 10:31:35 +0000 (12:31 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Apr 2024 09:17:27 +0000 (11:17 +0200)
commitab75ecb79be3b856f63bef4c91aef0dc17d405cb
tree04370c6fac0ffbe5a5b9af31ac40a69aa86e4450
parent748e62dbf5065c7d166c827425c7797389b5f9fe
vga: optimize computation of dirty memory region

The depth == 0 and depth == 15 have to be special cased because
width * depth / 8 does not provide the correct scanline length.
However, thanks to the recent reorganization of vga_draw_graphic()
the correct value of VRAM bits per pixel is available in "bits".

Use it (via the same "bwidth" computation that is used later in
the function), thus restricting the slow path to the wraparound case.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/display/vga.c