[Spice-commits] client/display_channel.cpp

Alexander Larsson alexl at kemper.freedesktop.org
Wed Jun 9 02:17:39 PDT 2010


 client/display_channel.cpp |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 3e989a361c421ba4980f125f57ed2505d0bf412c
Author: Alexander Larsson <alexl at redhat.com>
Date:   Wed Jun 9 11:16:48 2010 +0200

    client: Only invalidate on screen if drawing to the primary surface

diff --git a/client/display_channel.cpp b/client/display_channel.cpp
index abfe636..5d18517 100644
--- a/client/display_channel.cpp
+++ b/client/display_channel.cpp
@@ -1534,7 +1534,9 @@ void DisplayChannel::handle_surface_destroy(RedPeer::InMessage* message)
     PRE_DRAW;                                       \
     canvas->draw_##type(*type, message->size());    \
     POST_DRAW;                                      \
-    invalidate(type->base.box, false);              \
+    if (type->base.surface_id == 0) {               \
+        invalidate(type->base.box, false);          \
+    }                                               \
 }
 
 void DisplayChannel::handle_copy_bits(RedPeer::InMessage* message)
@@ -1545,7 +1547,9 @@ void DisplayChannel::handle_copy_bits(RedPeer::InMessage* message)
     canvas = surfaces_mngr.get_canvas(copy_bits->base.surface_id);
     canvas->copy_bits(*copy_bits, message->size());
     POST_DRAW;
-    invalidate(copy_bits->base.box, false);
+    if (copy_bits->base.surface_id == 0) {
+        invalidate(copy_bits->base.box, false);
+    }
 }
 
 void DisplayChannel::handle_draw_fill(RedPeer::InMessage* message)


More information about the Spice-commits mailing list