graphics/console-draw: Collapse consecutive damage entries
This significantly improves performance of drawing inside a terminal VT while using virtio-gpu. Still not completely on par with using vesad, but it is getting somewhat close.
time cat /bin/ls
# VGA (1280x800)
5.2s -> 5.1s
# virtio-gpu (640x480)
4.8s -> 2.6s
# virtio-gpu (1280x800)
7.8s -> 6.0s
# virtio-gpu (1920x998)
11.8s -> 8.1s
Edited by bjorn3