diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2010-08-30 13:38:16 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2010-08-30 18:53:29 +0300 |
commit | fbd874a464b739933947cdb3a54ab329ecf30a6f (patch) | |
tree | c97d3cda8c180946b1839d3bdd88139195b292dd /server | |
parent | e13be77f33609cb3fdae354ce1f2686ae865f9e0 (diff) | |
download | spice-fbd874a464b739933947cdb3a54ab329ecf30a6f.tar.gz spice-fbd874a464b739933947cdb3a54ab329ecf30a6f.tar.xz spice-fbd874a464b739933947cdb3a54ab329ecf30a6f.zip |
server: fix red_current_flush to flush only the surface that was given as parameter
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.
Diffstat (limited to 'server')
-rw-r--r-- | 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 75760870..a11f428c 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); |