[Spice-commits] 2 commits - server/red_worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Oct 1 01:44:27 PDT 2015
server/red_worker.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
New commits:
commit bb969255c99a2bc1c99a38f7992893a16b604661
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Tue Oct 1 18:07:09 2013 +0200
worker: count in drawable_new()
diff --git a/server/red_worker.c b/server/red_worker.c
index 782028b..2efb311 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -4083,7 +4083,6 @@ static Drawable *get_drawable(RedWorker *worker, uint8_t effect, RedDrawable *re
free_one_drawable(worker, FALSE);
}
worker->drawable_count++;
- worker->red_drawable_count++;
memset(drawable, 0, sizeof(Drawable));
drawable->refs = 1;
clock_gettime(CLOCK_MONOTONIC, &time);
@@ -4998,11 +4997,13 @@ static int red_process_cursor(RedWorker *worker, uint32_t max_pipe_size, int *ri
return n;
}
-static RedDrawable *red_drawable_new(void)
+static RedDrawable *red_drawable_new(RedWorker *worker)
{
RedDrawable * red = spice_new0(RedDrawable, 1);
red->refs = 1;
+ worker->red_drawable_count++;
+
return red;
}
@@ -5045,7 +5046,7 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
worker->repoll_cmd_ring = 0;
switch (ext_cmd.cmd.type) {
case QXL_CMD_DRAW: {
- RedDrawable *red_drawable = red_drawable_new(); // returns with 1 ref
+ RedDrawable *red_drawable = red_drawable_new(worker); // returns with 1 ref
if (!red_get_drawable(&worker->mem_slots, ext_cmd.group_id,
red_drawable, ext_cmd.cmd.data, ext_cmd.flags)) {
commit 61d458119e3f34085fd4e362861c815f39d40a00
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Mon Jan 12 15:45:43 2015 -0600
PALLET -> PALETTE
Use the correct spelling for the enumeration
diff --git a/server/red_worker.c b/server/red_worker.c
index e2feb23..782028b 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -301,7 +301,7 @@ enum {
PIPE_ITEM_TYPE_PIXMAP_SYNC,
PIPE_ITEM_TYPE_PIXMAP_RESET,
PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE,
- PIPE_ITEM_TYPE_INVAL_PALLET_CACHE,
+ PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE,
PIPE_ITEM_TYPE_CREATE_SURFACE,
PIPE_ITEM_TYPE_DESTROY_SURFACE,
PIPE_ITEM_TYPE_MONITORS_CONFIG,
@@ -9227,7 +9227,7 @@ static void display_channel_send_item(RedChannelClient *rcc, PipeItem *pipe_item
case PIPE_ITEM_TYPE_PIXMAP_RESET:
display_channel_marshall_reset_cache(rcc, m);
break;
- case PIPE_ITEM_TYPE_INVAL_PALLET_CACHE:
+ case PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE:
red_reset_palette_cache(dcc);
red_marshall_verb(rcc, SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES);
break;
@@ -9767,7 +9767,7 @@ static void push_new_primary_surface(DisplayChannelClient *dcc)
{
RedChannelClient *rcc = &dcc->common.base;
- red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_INVAL_PALLET_CACHE);
+ red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE);
red_create_surface_item(dcc, 0);
red_channel_client_push(rcc);
}
@@ -10210,7 +10210,7 @@ static int display_channel_handle_migrate_data(RedChannelClient *rcc, uint32_t s
if (!surfaces_restored) {
return FALSE;
}
- red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_INVAL_PALLET_CACHE);
+ red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE);
/* enable sending messages */
red_channel_client_ack_zero_messages_window(rcc);
return TRUE;
@@ -10643,7 +10643,7 @@ static void display_channel_client_release_item_before_push(DisplayChannelClient
case PIPE_ITEM_TYPE_MIGRATE_DATA:
case PIPE_ITEM_TYPE_PIXMAP_SYNC:
case PIPE_ITEM_TYPE_PIXMAP_RESET:
- case PIPE_ITEM_TYPE_INVAL_PALLET_CACHE:
+ case PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE:
case PIPE_ITEM_TYPE_STREAM_ACTIVATE_REPORT:
free(item);
break;
@@ -11180,7 +11180,7 @@ static inline void dev_destroy_surfaces(RedWorker *worker)
if (display_is_connected(worker)) {
red_channel_pipes_add_type(&worker->display_channel->common.base,
- PIPE_ITEM_TYPE_INVAL_PALLET_CACHE);
+ PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE);
red_pipes_add_verb(&worker->display_channel->common.base,
SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL);
}
More information about the Spice-commits
mailing list