[PATCH spice-gtk] display: blank surface on creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index a57453f..96b311d 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -723,7 +723,11 @@ static int create_canvas(SpiceChannel *channel, display_surface *surface)
     }
 
     if (surface->shmid == -1) {
-        surface->data = spice_malloc(surface->size);
+        /* in theory, zero-ing the surface shouldn't be necessary, as
+           only invalidated/painted region should be shown however,
+           this shows less artifact on resolution changes (probably
+           some regions are painted, but with masks etc) */
+        surface->data = g_malloc0(surface->size);
     }
 
     g_return_val_if_fail(c->glz_window, 0);
-- 
1.8.3.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]