aboutsummaryrefslogtreecommitdiff
path: root/hw/qxl-render.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-03-05 15:24:14 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-03-18 10:21:59 +0100
commitc78f71378a345ea240c288993ca1378ded5504b9 (patch)
tree0d5dc0c86064556faed610883db4422ac13c6d66 /hw/qxl-render.c
parentbc2ed9704fff2c721e4056ab5281f0291718bfa6 (diff)
console: stop using DisplayState in gfx hardware emulation
Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qxl-render.c')
-rw-r--r--hw/qxl-render.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/qxl-render.c b/hw/qxl-render.c
index 087679e142..8cd9be434d 100644
--- a/hw/qxl-render.c
+++ b/hw/qxl-render.c
@@ -23,11 +23,12 @@
static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)
{
+ DisplaySurface *surface = qemu_console_surface(qxl->vga.con);
+ uint8_t *dst = surface_data(surface);
uint8_t *src;
- uint8_t *dst = ds_get_data(qxl->vga.ds);
int len, i;
- if (is_buffer_shared(qxl->vga.ds->surface)) {
+ if (is_buffer_shared(surface)) {
return;
}
if (!qxl->guest_primary.data) {
@@ -125,14 +126,14 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
(qxl->guest_primary.surface.width,
qxl->guest_primary.surface.height);
}
- dpy_gfx_replace_surface(vga->ds, surface);
+ dpy_gfx_replace_surface(vga->con, surface);
}
for (i = 0; i < qxl->num_dirty_rects; i++) {
if (qemu_spice_rect_is_empty(qxl->dirty+i)) {
break;
}
qxl_blit(qxl, qxl->dirty+i);
- dpy_gfx_update(vga->ds,
+ dpy_gfx_update(vga->con,
qxl->dirty[i].left, qxl->dirty[i].top,
qxl->dirty[i].right - qxl->dirty[i].left,
qxl->dirty[i].bottom - qxl->dirty[i].top);
@@ -236,7 +237,7 @@ int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext)
return 1;
}
- if (!dpy_cursor_define_supported(qxl->ssd.dcl.ds)) {
+ if (!dpy_cursor_define_supported(qxl->vga.con)) {
return 0;
}