On 10/16/2013 10:08 PM, Marc-André Lureau wrote:
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.
ACK. On guest reboot / resolution change (reboot is just a special case
because of entering vga mode, which is from server pov a special case of
resolution change) the server sends a new surface, which is not blank
(not all zeros). That is an emulation error since I don't believe it
happens in real life, but it's way easier to fix it here. so ack.
---
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);
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel