summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-11-19 13:48:24 +0000
committerFrediano Ziglio <fziglio@redhat.com>2015-11-23 11:29:03 +0000
commit6bc1aa90c65e3b551006a0a7e335167e7d9838c3 (patch)
treef4d01fb8147d50acc6d7b4c14919b4f5f01f0921 /server
parent454e521b17bc97931eac0046df030d914e1bca51 (diff)
downloadspice-6bc1aa90c65e3b551006a0a7e335167e7d9838c3.zip
spice-6bc1aa90c65e3b551006a0a7e335167e7d9838c3.tar.gz
spice-6bc1aa90c65e3b551006a0a7e335167e7d9838c3.tar.xz
worker: move red_drawable_count to DisplayChannel
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
Diffstat (limited to 'server')
-rw-r--r--server/display-channel.h1
-rw-r--r--server/red_worker.c13
2 files changed, 7 insertions, 7 deletions
diff --git a/server/display-channel.h b/server/display-channel.h
index 531e08f..03834fa 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -194,6 +194,7 @@ struct DisplayChannel {
_Drawable drawables[NUM_DRAWABLES];
_Drawable *free_drawables;
+ uint32_t red_drawable_count;
uint32_t glz_drawable_count;
int stream_video;
diff --git a/server/red_worker.c b/server/red_worker.c
index c8f123d..f700829 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -139,7 +139,6 @@ struct RedWorker {
CursorChannel *cursor_channel;
uint32_t cursor_poll_tries;
- uint32_t red_drawable_count;
uint32_t bits_unique;
RedMemSlotInfo mem_slots;
@@ -564,7 +563,7 @@ void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable,
if (--red_drawable->refs) {
return;
}
- worker->red_drawable_count--;
+ worker->display_channel->red_drawable_count--;
release_info_ext.group_id = group_id;
release_info_ext.info = red_drawable->release_info;
worker->qxl->st->qif->release_resource(worker->qxl, release_info_ext);
@@ -1751,7 +1750,7 @@ static RedDrawable *red_drawable_new(RedWorker *worker)
RedDrawable * red = spice_new0(RedDrawable, 1);
red->refs = 1;
- worker->red_drawable_count++;
+ worker->display_channel->red_drawable_count++;
return red;
}
@@ -1878,7 +1877,7 @@ static void red_free_some(RedWorker *worker)
RingItem *item, *next;
spice_debug("#draw=%d, #red_draw=%d, #glz_draw=%d", display->drawable_count,
- worker->red_drawable_count, display->glz_drawable_count);
+ display->red_drawable_count, display->glz_drawable_count);
FOREACH_DCC(worker->display_channel, item, next, dcc) {
GlzSharedDictionary *glz_dict = dcc ? dcc->glz_dict : NULL;
@@ -4465,7 +4464,7 @@ static void display_channel_client_on_disconnect(RedChannelClient *rcc)
// this was the last channel client
spice_debug("#draw=%d, #red_draw=%d, #glz_draw=%d",
- display->drawable_count, worker->red_drawable_count,
+ display->drawable_count, display->red_drawable_count,
display->glz_drawable_count);
}
@@ -5960,7 +5959,7 @@ static void handle_dev_oom(void *opaque, void *payload)
// streams? but without streams also leak
spice_debug("OOM1 #draw=%u, #red_draw=%u, #glz_draw=%u current %u pipes %u",
display->drawable_count,
- worker->red_drawable_count,
+ display->red_drawable_count,
display->glz_drawable_count,
display->current_size,
worker->display_channel ?
@@ -5974,7 +5973,7 @@ static void handle_dev_oom(void *opaque, void *payload)
}
spice_debug("OOM2 #draw=%u, #red_draw=%u, #glz_draw=%u current %u pipes %u",
display->drawable_count,
- worker->red_drawable_count,
+ display->red_drawable_count,
display->glz_drawable_count,
display->current_size,
worker->display_channel ?