[Spice-devel] [PATCH] server: fix red_current_flush to flush only the surface that was given as parameter
Yonit Halperin
yhalperi at redhat.com
Mon Aug 30 04:03:49 PDT 2010
A side effect of the previous red_current_flush, which flushed all the surfaces, and was called on a new display channel connection, was
that red_handle_drawable_surfaces_client_synced sent the most updated surfaces images when needed. However, now, it should
explicitly call red_current_flush.
Moreover, since red_current_flush was called on a new display channel connection only if there was a primary surface,
if the connection of the display channel occurred at the moment of no primary surface, red_handle_drawable_surfaces_client_synced was buggy.
---
server/red_worker.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index 7576087..a11f428 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1235,6 +1235,7 @@ static inline void red_handle_drawable_surfaces_client_synced(RedWorker *worker,
continue;
}
red_create_surface_item(worker, surface_id);
+ red_current_flush(worker, surface_id);
red_add_surface_image(worker, surface_id);
}
}
@@ -1244,6 +1245,7 @@ static inline void red_handle_drawable_surfaces_client_synced(RedWorker *worker,
}
red_create_surface_item(worker, drawable->surface_id);
+ red_current_flush(worker, drawable->surface_id);
red_add_surface_image(worker, drawable->surface_id);
}
@@ -4417,7 +4419,7 @@ static void red_free_some(RedWorker *worker)
static void red_current_flush(RedWorker *worker, int surface_id)
{
- while (!ring_is_empty(&worker->current_list)) {
+ while (!ring_is_empty(&worker->surfaces[surface_id].current_list)) {
free_one_drawable(worker, FALSE);
}
red_current_clear(worker, surface_id);
--
1.7.1.1
More information about the Spice-devel
mailing list