[Spice-devel] [spice-server 10/10] display-channel: Remove extra group_id arguments
Christophe Fergeau
cfergeau at redhat.com
Fri Feb 12 17:51:09 UTC 2016
They are now carried in the appropriate command through
QXLReleaseInfoExt, so we don't need to pass them around explicitly.
---
server/display-channel.c | 12 ++++++------
server/display-channel.h | 3 ---
server/red-worker.c | 8 +++-----
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index b4b46a6..74adcbc 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -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;
diff --git a/server/display-channel.h b/server/display-channel.h
index 24d83a3..13b13b1 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -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);
diff --git a/server/red-worker.c b/server/red-worker.c
index a498e20..b68b17a 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -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);
--
2.5.0
More information about the Spice-devel
mailing list