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/tc6393xb.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/tc6393xb.c')
| -rw-r--r-- | hw/tc6393xb.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/hw/tc6393xb.c b/hw/tc6393xb.c index 0755463a1d..79c971b439 100644 --- a/hw/tc6393xb.c +++ b/hw/tc6393xb.c @@ -125,7 +125,7 @@ struct TC6393xbState { DeviceState *flash; ECCState ecc; - DisplayState *ds; + QemuConsole *con; MemoryRegion vram; uint16_t *vram_ptr; uint32_t scr_width, scr_height; /* in pixels */ @@ -433,7 +433,9 @@ static void tc6393xb_nand_writeb(TC6393xbState *s, hwaddr addr, uint32_t value) static void tc6393xb_draw_graphic(TC6393xbState *s, int full_update) { - switch (ds_get_bits_per_pixel(s->ds)) { + DisplaySurface *surface = qemu_console_surface(s->con); + + switch (surface_bits_per_pixel(surface)) { case 8: tc6393xb_draw_graphic8(s); break; @@ -450,34 +452,37 @@ static void tc6393xb_draw_graphic(TC6393xbState *s, int full_update) tc6393xb_draw_graphic32(s); break; default: - printf("tc6393xb: unknown depth %d\n", ds_get_bits_per_pixel(s->ds)); + printf("tc6393xb: unknown depth %d\n", + surface_bits_per_pixel(surface)); return; } - dpy_gfx_update(s->ds, 0, 0, s->scr_width, s->scr_height); + dpy_gfx_update(s->con, 0, 0, s->scr_width, s->scr_height); } static void tc6393xb_draw_blank(TC6393xbState *s, int full_update) { + DisplaySurface *surface = qemu_console_surface(s->con); int i, w; uint8_t *d; if (!full_update) return; - w = s->scr_width * ((ds_get_bits_per_pixel(s->ds) + 7) >> 3); - d = ds_get_data(s->ds); + w = s->scr_width * surface_bytes_per_pixel(surface); + d = surface_data(surface); for(i = 0; i < s->scr_height; i++) { memset(d, 0, w); - d += ds_get_linesize(s->ds); + d += surface_stride(surface); } - dpy_gfx_update(s->ds, 0, 0, s->scr_width, s->scr_height); + dpy_gfx_update(s->con, 0, 0, s->scr_width, s->scr_height); } static void tc6393xb_update_display(void *opaque) { TC6393xbState *s = opaque; + DisplaySurface *surface = qemu_console_surface(s->con); int full_update; if (s->scr_width == 0 || s->scr_height == 0) @@ -488,8 +493,9 @@ static void tc6393xb_update_display(void *opaque) s->blanked = s->blank; full_update = 1; } - if (s->scr_width != ds_get_width(s->ds) || s->scr_height != ds_get_height(s->ds)) { - qemu_console_resize(s->ds, s->scr_width, s->scr_height); + if (s->scr_width != surface_width(surface) || + s->scr_height != surface_height(surface)) { + qemu_console_resize(s->con, s->scr_width, s->scr_height); full_update = 1; } if (s->blanked) @@ -577,7 +583,7 @@ TC6393xbState *tc6393xb_init(MemoryRegion *sysmem, uint32_t base, qemu_irq irq) memory_region_add_subregion(sysmem, base + 0x100000, &s->vram); s->scr_width = 480; s->scr_height = 640; - s->ds = graphic_console_init(tc6393xb_update_display, + s->con = graphic_console_init(tc6393xb_update_display, NULL, /* invalidate */ NULL, /* screen_dump */ NULL, /* text_update */ |