diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-18 07:34:24 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-18 07:34:24 -0500 |
| commit | e531761d63b7f8fe6b6423fafb3616ebbff768aa (patch) | |
| tree | a4ca2537f1e887d8c81ff6820baccb039634d320 /hw/qxl-render.c | |
| parent | b1999e87b4d42305419329cae459e1b43f706d96 (diff) | |
| parent | 1562e53112fd1082c656a06d953a7447ab17e6e1 (diff) | |
| download | focaccia-qemu-e531761d63b7f8fe6b6423fafb3616ebbff768aa.tar.gz focaccia-qemu-e531761d63b7f8fe6b6423fafb3616ebbff768aa.zip | |
Merge remote-tracking branch 'kraxel/pixman.v8' into staging
# By Gerd Hoffmann (18) and others # Via Blue Swirl (1) and Gerd Hoffmann (1) * kraxel/pixman.v8: (37 commits) console: remove ds_get_* helper functions console: zap color_table console: stop using DisplayState in gfx hardware emulation console: zap displaystate from dcl callbacks cocoa: stop using DisplayState spice: stop using DisplayState sdl: stop using DisplayState vnc: stop using DisplayState gtk: stop using DisplayState console: add surface_*() getters console: rework DisplaySurface handling [dcl/ui side] console: rework DisplaySurface handling [vga emu side] sdl: drop dead code qxl: better vga init in enter_vga_mode qxl: zap qxl0 global spice: zap sdpy global console: kill DisplayState->opaque console: fix displaychangelisteners interface s390: Fix cpu refactoring fallout. target-mips: fix rndrashift_short_acc and code for EXTR_ instructions ...
Diffstat (limited to 'hw/qxl-render.c')
| -rw-r--r-- | hw/qxl-render.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/hw/qxl-render.c b/hw/qxl-render.c index d77df42b7e..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) { @@ -98,6 +99,7 @@ static void qxl_set_rect_to_surface(PCIQXLDevice *qxl, QXLRect *area) static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) { VGACommonState *vga = &qxl->vga; + DisplaySurface *surface; int i; if (qxl->guest_primary.resized) { @@ -112,8 +114,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) qxl->guest_primary.bytes_pp, qxl->guest_primary.bits_pp); if (qxl->guest_primary.qxl_stride > 0) { - qemu_free_displaysurface(vga->ds); - vga->ds->surface = qemu_create_displaysurface_from + surface = qemu_create_displaysurface_from (qxl->guest_primary.surface.width, qxl->guest_primary.surface.height, qxl->guest_primary.bits_pp, @@ -121,18 +122,18 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl) qxl->guest_primary.data, false); } else { - qemu_resize_displaysurface(vga->ds, - qxl->guest_primary.surface.width, - qxl->guest_primary.surface.height); + surface = qemu_create_displaysurface + (qxl->guest_primary.surface.width, + qxl->guest_primary.surface.height); } - dpy_gfx_resize(vga->ds); + 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.ds)) { + if (!dpy_cursor_define_supported(qxl->vga.con)) { return 0; } |