diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-04 16:37:08 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-08 18:52:37 +0100 |
commit | 1f110516190f146df40f49aef2f1ef5903b8f540 (patch) | |
tree | 45a268e82093ef2c2cd032a64d816dd069641fa7 /hw | |
parent | ada804eb8972c42418a8052c0a1e0493714c75f5 (diff) | |
download | qemu-1f110516190f146df40f49aef2f1ef5903b8f540.zip qemu-1f110516190f146df40f49aef2f1ef5903b8f540.tar.gz qemu-1f110516190f146df40f49aef2f1ef5903b8f540.tar.bz2 |
artist: only render dirty scanlines on the display surface
The framebuffer_update_display() function returns the dirty scanlines that were
touched since the last display update, however artist_update_display() always calls
dpy_gfx_update() with start and end scanlines of 0 and s->height causing the
entire display surface to be rendered on every update.
Update artist_update_display() so that dpy_gfx_update() only renders the dirty
scanlines on the display surface, bypassing the display surface rendering
completely if framebuffer_update_display() indicates no changes occurred.
This noticeably improves boot performance when the framebuffer is enabled on my
rather modest laptop here, including making the GTK UI usable.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220504153708.10352-4-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/artist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c index 4a9f7b5..39fc0c4 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -1243,7 +1243,9 @@ static void artist_update_display(void *opaque) artist_draw_cursor(s); - dpy_gfx_update(s->con, 0, 0, s->width, s->height); + if (first >= 0) { + dpy_gfx_update(s->con, 0, first, s->width, last - first + 1); + } } static void artist_invalidate(void *opaque) |