display-channel: Remove extra group_id arguments

They are now carried in the appropriate command through
QXLReleaseInfoExt, so we don't need to pass them around explicitly.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Christophe Fergeau 2016-02-12 18:51:09 +01:00 committed by Frediano Ziglio
parent 705be34b5e
commit 7870c27fca
3 changed files with 9 additions and 14 deletions

View File

@ -1072,7 +1072,7 @@ static int validate_drawable_bbox(DisplayChannel *display, RedDrawable *drawable
* @return initialized Drawable or NULL on failure
*/
static Drawable *display_channel_get_drawable(DisplayChannel *display, uint8_t effect,
RedDrawable *red_drawable, uint32_t group_id,
RedDrawable *red_drawable,
uint32_t process_commands_generation)
{
Drawable *drawable;
@ -1091,7 +1091,7 @@ static Drawable *display_channel_get_drawable(DisplayChannel *display, uint8_t e
}
}
drawable = display_channel_drawable_try_new(display, group_id, process_commands_generation);
drawable = display_channel_drawable_try_new(display, process_commands_generation);
if (!drawable) {
return NULL;
}
@ -1169,10 +1169,10 @@ static void display_channel_add_drawable(DisplayChannel *display, Drawable *draw
}
void display_channel_process_draw(DisplayChannel *display, RedDrawable *red_drawable,
uint32_t group_id, int process_commands_generation)
int process_commands_generation)
{
Drawable *drawable =
display_channel_get_drawable(display, red_drawable->effect, red_drawable, group_id,
display_channel_get_drawable(display, red_drawable->effect, red_drawable,
process_commands_generation);
if (!drawable) {
@ -1359,7 +1359,7 @@ static void drawables_init(DisplayChannel *display)
* @return pointer to uninitialized Drawable or NULL on failure
*/
Drawable *display_channel_drawable_try_new(DisplayChannel *display,
int group_id, int process_commands_generation)
int process_commands_generation)
{
Drawable *drawable;
@ -2074,7 +2074,7 @@ DisplayChannel* display_channel_new(RedWorker *worker, int migrate, int stream_v
}
void display_channel_process_surface_cmd(DisplayChannel *display, RedSurfaceCmd *surface,
uint32_t group_id, int loadvm)
int loadvm)
{
uint32_t surface_id;
RedSurface *red_surface;

View File

@ -277,7 +277,6 @@ int display_channel_get_streams_timeout (DisplayCha
void display_channel_compress_stats_print (const DisplayChannel *display);
void display_channel_compress_stats_reset (DisplayChannel *display);
Drawable * display_channel_drawable_try_new (DisplayChannel *display,
int group_id,
int process_commands_generation);
void display_channel_drawable_unref (DisplayChannel *display, Drawable *drawable);
void display_channel_surface_unref (DisplayChannel *display,
@ -298,11 +297,9 @@ void display_channel_destroy_surface (DisplayCha
uint32_t display_channel_generate_uid (DisplayChannel *display);
void display_channel_process_draw (DisplayChannel *display,
RedDrawable *red_drawable,
uint32_t group_id,
int process_commands_generation);
void display_channel_process_surface_cmd (DisplayChannel *display,
RedSurfaceCmd *surface,
uint32_t group_id,
int loadvm);
void display_channel_update_compression (DisplayChannel *display,
DisplayChannelClient *dcc);

View File

@ -234,7 +234,7 @@ static int red_process_display(RedWorker *worker, int *ring_is_empty)
if (!red_get_drawable(&worker->mem_slots, ext_cmd.group_id,
red_drawable, ext_cmd.cmd.data, ext_cmd.flags)) {
display_channel_process_draw(worker->display_channel, red_drawable, ext_cmd.group_id,
display_channel_process_draw(worker->display_channel, red_drawable,
worker->process_display_generation);
}
// release the red_drawable
@ -280,8 +280,7 @@ static int red_process_display(RedWorker *worker, int *ring_is_empty)
&surface, ext_cmd.cmd.data)) {
break;
}
display_channel_process_surface_cmd(worker->display_channel, &surface,
ext_cmd.group_id, FALSE);
display_channel_process_surface_cmd(worker->display_channel, &surface, FALSE);
// do not release resource as is released inside display_channel_process_surface_cmd
red_put_surface_cmd(&surface);
break;
@ -1169,8 +1168,7 @@ static int loadvm_command(RedWorker *worker, QXLCommandExt *ext)
free(surface_cmd);
return FALSE;
}
display_channel_process_surface_cmd(worker->display_channel, surface_cmd,
ext->group_id, TRUE);
display_channel_process_surface_cmd(worker->display_channel, surface_cmd, TRUE);
break;
default:
spice_warning("unhandled loadvm command type (%d)", ext->cmd.type);