spice-gtk/0007-display-blank-surface-on-creation.patch

35 lines
1.2 KiB
Diff

From 32b123f44fc79eaad388d6be09f103457f35d734 Mon Sep 17 00:00:00 2001
Message-Id: <32b123f44fc79eaad388d6be09f103457f35d734.1384710425.git.crobinso@redhat.com>
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 16 Oct 2013 21:00:31 +0200
Subject: [PATCH] display: blank surface on creation
In theory, zero-ing the surface shouldn't be necessary, as only
invalidated/painted region should be shown. However, this results in
less artifacts on resolution changes (probably some regions are painted,
but with masks, blend, copy etc), in particular on console after VM
reboot.
---
gtk/channel-display.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 030679b..4d55337 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -722,9 +722,8 @@ static int create_canvas(SpiceChannel *channel, display_surface *surface)
surface->shmid = -1;
}
- if (surface->shmid == -1) {
- surface->data = spice_malloc(surface->size);
- }
+ if (surface->shmid == -1)
+ surface->data = g_malloc0(surface->size);
g_return_val_if_fail(c->glz_window, 0);
--
1.8.4.2