[Spice-commits] gtk/channel-display.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Wed Nov 6 00:46:45 PST 2013


 gtk/channel-display.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 32b123f44fc79eaad388d6be09f103457f35d734
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Oct 16 21:00:31 2013 +0200

    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.

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);
 


More information about the Spice-commits mailing list