diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-23 09:11:13 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-04-26 13:50:58 +0300 |
commit | 8baba2af2194d4ea17a627452f1851df565c9344 (patch) | |
tree | 8b1e364a540cc7ecb77b83673944fe071ded6fea | |
parent | 140025215d62b24d4afdd3786eb381fde3f5fb15 (diff) |
server/red_worker: handle_dev_destroy_surfaces: clear all surfaces
-rw-r--r-- | server/red_worker.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index 9795dab4..ca596627 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -10256,16 +10256,10 @@ static inline void handle_dev_destroy_surface_wait(RedWorker *worker) } /* called upon device reset */ - -/* TODO: split me*/ -static inline void handle_dev_destroy_surfaces(RedWorker *worker) +static inline void __handle_dev_destroy_surfaces(RedWorker *worker, Surfaces *surfaces) { - Surfaces *surfaces = &worker->surfaces; int i; - RedWorkerMessage message; - red_printf(""); - flush_all_qxl_commands(worker); //to handle better for (i = 0; i < NUM_SURFACES; ++i) { if (surfaces->surfaces[i].context.canvas) { @@ -10277,7 +10271,19 @@ static inline void handle_dev_destroy_surfaces(RedWorker *worker) } } ASSERT(ring_is_empty(&surfaces->streams)); +} +static inline void handle_dev_destroy_surfaces(RedWorker *worker) +{ + RedWorkerMessage message; + RingItem *link; + Surfaces *surfaces; + + red_printf(""); + flush_all_qxl_commands(worker); + SURFACES_FOREACH(link, surfaces, worker) { + __handle_dev_destroy_surfaces(worker, surfaces); + } if (cursor_connected(worker)) { red_wait_outgoing_items(&worker->cursor_channel->common.base); red_channel_pipes_add_type(&worker->cursor_channel->common.base, |