virtio-gpu: Do not distinguish the primary console

In the past, virtio-gpu set NULL as the surface for the secondary
consoles to hide its window. The distinction is now handled in
ui/console and the display backends and virtio-gpu does no longer
have to do that.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210225101316.83940-3-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Akihiko Odaki 2021-02-25 19:13:16 +09:00 committed by Gerd Hoffmann
parent c821a58ee7
commit ed8f3fe689
4 changed files with 6 additions and 22 deletions

View file

@ -179,10 +179,8 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g,
info.width, info.height,
ss.r.x, ss.r.y, ss.r.width, ss.r.height);
} else {
if (ss.scanout_id != 0) {
dpy_gfx_replace_surface(
g->parent_obj.scanout[ss.scanout_id].con, NULL);
}
dpy_gfx_replace_surface(
g->parent_obj.scanout[ss.scanout_id].con, NULL);
dpy_gl_scanout_disable(g->parent_obj.scanout[ss.scanout_id].con);
}
g->parent_obj.scanout[ss.scanout_id].resource_id = ss.resource_id;
@ -595,9 +593,7 @@ void virtio_gpu_virgl_reset(VirtIOGPU *g)
virgl_renderer_reset();
for (i = 0; i < g->parent_obj.conf.max_outputs; i++) {
if (i != 0) {
dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL);
}
dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL);
dpy_gl_scanout_disable(g->parent_obj.scanout[i].con);
}
}