From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 1/4] console: skip same-size resize
Date: Wed, 28 Sep 2016 14:01:54 +0200 [thread overview]
Message-ID: <1475064117-11571-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1475064117-11571-1-git-send-email-kraxel@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
virtio-gpu does a set-scanout at each frame (it might be a driver
regression). qemu_console_resize() recreate a surface even if the size
didn't change, and this shows up in profiling reports because the
surface is cleared. With this patch, I get a +15-20% glmark2
improvement.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20160826094711.14470-1-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/console.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ui/console.c b/ui/console.c
index 3940762..394786b 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2101,6 +2101,13 @@ void qemu_console_resize(QemuConsole *s, int width, int height)
DisplaySurface *surface;
assert(s->console_type == GRAPHIC_CONSOLE);
+
+ if (s->surface &&
+ pixman_image_get_width(s->surface->image) == width &&
+ pixman_image_get_height(s->surface->image) == height) {
+ return;
+ }
+
surface = qemu_create_displaysurface(width, height);
dpy_gfx_replace_surface(s, surface);
}
--
1.8.3.1
next prev parent reply other threads:[~2016-09-28 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 12:01 [Qemu-devel] [PULL 0/4] ui: console+vnc fixes, switch spice to pure opengl with gl=on Gerd Hoffmann
2016-09-28 12:01 ` Gerd Hoffmann [this message]
2016-09-28 12:01 ` [Qemu-devel] [PULL 2/4] console: track gl_block state in QemuConsole Gerd Hoffmann
2016-09-28 12:01 ` [Qemu-devel] [PULL 3/4] spice/gl: render DisplaySurface via opengl Gerd Hoffmann
2016-09-28 12:01 ` [Qemu-devel] [PULL 4/4] ui/vnc-enc-tight: remove switch and have single return Gerd Hoffmann
2016-09-28 16:43 ` [Qemu-devel] [PULL 0/4] ui: console+vnc fixes, switch spice to pure opengl with gl=on Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475064117-11571-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).