summaryrefslogtreecommitdiffstats
path: root/server/tests/test_display_base.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-04-19 13:48:41 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-05-03 13:09:51 +0300
commit76fd64ad96aed9d7e567eb5e447a5d83181743f2 (patch)
treedcba375f5d3bbdaab1c2d98ffbdb9b77b88a3301 /server/tests/test_display_base.c
parent703f32cda91db552167324c542e19ef720c474dc (diff)
downloadspice-76fd64ad96aed9d7e567eb5e447a5d83181743f2.tar.gz
spice-76fd64ad96aed9d7e567eb5e447a5d83181743f2.tar.xz
spice-76fd64ad96aed9d7e567eb5e447a5d83181743f2.zip
server/tests: refactor Command
Diffstat (limited to 'server/tests/test_display_base.c')
-rw-r--r--server/tests/test_display_base.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 4211f290..49b79734 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -453,7 +453,7 @@ static void produce_command(void)
command = &g_commands[cmd_index];
if (command->cb) {
- command->cb(command->cb_opaque, &command->arg1, &command->arg2);
+ command->cb(command);
}
switch (command->command) {
case PATH_PROGRESS:
@@ -511,15 +511,13 @@ static void produce_command(void)
break;
}
- case DESTROY_PRIMARY: {
+ case DESTROY_PRIMARY:
qxl_worker->destroy_primary_surface(qxl_worker, 0);
break;
- }
- case CREATE_PRIMARY: {
- create_primary_surface(qxl_worker, command->arg1, command->arg2);
+ case CREATE_PRIMARY:
+ create_primary_surface(qxl_worker, command->create_primary.width, command->create_primary.height);
break;
- }
}
cmd_index = (cmd_index + 1) % g_num_commands;
}