mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
worker: Use more local vars in dev_create_primary_surface
There's already a 'display' variable equal to worker->display_channel which is not consistently used. This commit also adds a new 'channel' local variable to limit the number of upcasts to RedChannel. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
c0f1c65b30
commit
ca8ffdb8ef
@ -527,7 +527,8 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
|
||||
line_0, surface.flags & QXL_SURF_FLAG_KEEP_DATA, TRUE);
|
||||
display_channel_set_monitors_config_to_primary(display);
|
||||
|
||||
CommonGraphicsChannel *common = COMMON_GRAPHICS_CHANNEL(worker->display_channel);
|
||||
CommonGraphicsChannel *common = COMMON_GRAPHICS_CHANNEL(display);
|
||||
RedChannel *channel = RED_CHANNEL(display);
|
||||
if (display_is_connected(worker) &&
|
||||
!common_graphics_channel_get_during_target_migrate(common)) {
|
||||
/* guest created primary, so it will (hopefully) send a monitors_config
|
||||
@ -535,9 +536,8 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
|
||||
if (!worker->driver_cap_monitors_config) {
|
||||
display_channel_push_monitors_config(display);
|
||||
}
|
||||
red_channel_pipes_add_empty_msg(RED_CHANNEL(worker->display_channel),
|
||||
SPICE_MSG_DISPLAY_MARK);
|
||||
red_channel_push(RED_CHANNEL(worker->display_channel));
|
||||
red_channel_pipes_add_empty_msg(channel, SPICE_MSG_DISPLAY_MARK);
|
||||
red_channel_push(channel);
|
||||
}
|
||||
|
||||
cursor_channel_do_init(worker->cursor_channel);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user