From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: libvir-list@redhat.com,
"Peter Maydell" <peter.maydell@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PULL 10/11] ui: fold qemu_alloc_display in only caller
Date: Tue, 16 Mar 2021 06:38:12 +0100 [thread overview]
Message-ID: <20210316053813.1719442-11-kraxel@redhat.com> (raw)
In-Reply-To: <20210316053813.1719442-1-kraxel@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
A minor code simplification.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210312100108.2706195-2-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/console.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index c2fdf975b6b3..2de5f4105b59 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1386,26 +1386,18 @@ static QemuConsole *new_console(DisplayState *ds, console_type_t console_type,
return s;
}
-static void qemu_alloc_display(DisplaySurface *surface, int width, int height)
+DisplaySurface *qemu_create_displaysurface(int width, int height)
{
- qemu_pixman_image_unref(surface->image);
- surface->image = NULL;
+ DisplaySurface *surface = g_new0(DisplaySurface, 1);
+ trace_displaysurface_create(surface, width, height);
surface->format = PIXMAN_x8r8g8b8;
surface->image = pixman_image_create_bits(surface->format,
width, height,
NULL, width * 4);
assert(surface->image != NULL);
-
surface->flags = QEMU_ALLOCATED_FLAG;
-}
-DisplaySurface *qemu_create_displaysurface(int width, int height)
-{
- DisplaySurface *surface = g_new0(DisplaySurface, 1);
-
- trace_displaysurface_create(surface, width, height);
- qemu_alloc_display(surface, width, height);
return surface;
}
--
2.29.2
next prev parent reply other threads:[~2021-03-16 5:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 5:38 [PULL 00/11] Ui 20210316 patches Gerd Hoffmann
2021-03-16 5:38 ` [PULL 01/11] ui: introduce "password-secret" option for VNC servers Gerd Hoffmann
2021-03-16 5:38 ` [PULL 02/11] ui: introduce "password-secret" option for SPICE server Gerd Hoffmann
2021-03-16 5:38 ` [PULL 03/11] ui: deprecate "password" " Gerd Hoffmann
2021-03-16 5:38 ` [PULL 04/11] opengl: Do not convert format with glTexImage2D on OpenGL ES Gerd Hoffmann
2021-03-16 5:38 ` [PULL 05/11] ui/cocoa: Do not exit immediately after shutdown Gerd Hoffmann
2021-03-16 5:38 ` [PULL 06/11] ui: add more trace points for VNC client/server messages Gerd Hoffmann
2021-03-16 5:38 ` [PULL 07/11] ui: avoid sending framebuffer updates outside client desktop bounds Gerd Hoffmann
2021-03-16 5:38 ` [PULL 08/11] ui: use client width/height in WMVi message Gerd Hoffmann
2021-03-16 5:38 ` [PULL 09/11] ui: honour the actual guest display dimensions without rounding Gerd Hoffmann
2021-03-16 5:38 ` Gerd Hoffmann [this message]
2021-03-16 5:38 ` [PULL 11/11] ui/cocoa: Comment about modifier key input quirks Gerd Hoffmann
2021-03-17 14:59 ` [PULL 00/11] Ui 20210316 patches 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=20210316053813.1719442-11-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=libvir-list@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--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).