diff options
author | Alon Levy <alevy@redhat.com> | 2010-12-15 14:43:45 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2010-12-15 14:43:45 +0200 |
commit | 5d2aa8084e4432e6ae496e3e18f14c722041b9ea (patch) | |
tree | deaf15331811bd1f15c52561284afac71fc9d1c5 /server/red_worker.c | |
parent | 5f501a97f7c0ad5d5fb1f961ce5e78eb34f8f9e6 (diff) | |
download | spice-5d2aa8084e4432e6ae496e3e18f14c722041b9ea.tar.gz spice-5d2aa8084e4432e6ae496e3e18f14c722041b9ea.tar.xz spice-5d2aa8084e4432e6ae496e3e18f14c722041b9ea.zip |
server/red_worker: fix worker->drawable_count
drawable_count was becoming negative. It tracks the number of
items in the worker->current_list ring. It was decremented correctly,
but incremented only in several cases. The cases it wasn't incremented
where:
red_current_add_equal found an equivalent drawable
by moving the increment to where the item is added to current_list, in
__current_add_drawable, the accounting remains correct.
This has no affect other then correct accounting, as drawable_count isn't
used for anything.
Diffstat (limited to 'server/red_worker.c')
-rw-r--r-- | server/red_worker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index d59726f0..937e0aa2 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -2136,6 +2136,7 @@ static inline void __current_add_drawable(RedWorker *worker, Drawable *drawable, surface = &worker->surfaces[surface_id]; ring_add_after(&drawable->tree_item.base.siblings_link, pos); ring_add(&worker->current_list, &drawable->list_link); + worker->drawable_count++; ring_add(&surface->current_list, &drawable->surface_list_link); drawable->refs++; } @@ -3501,7 +3502,6 @@ static inline void red_process_drawable(RedWorker *worker, RedDrawable *drawable if (red_current_add_qxl(worker, &worker->surfaces[surface_id].current, item, drawable)) { - worker->drawable_count++; if (item->tree_item.effect != QXL_EFFECT_OPAQUE) { worker->transparent_count++; } |