diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-03-13 14:04:18 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-04-16 09:03:49 +0200 |
commit | 380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 (patch) | |
tree | e8097697817029ca6d545b8f68ba9761fb0f8164 /hw/display/vga.c | |
parent | 27be55872dd747c733a42a3d90864d9f59272d26 (diff) |
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,
instead of a bunch of function pointers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/vga.c')
-rw-r--r-- | hw/display/vga.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/display/vga.c b/hw/display/vga.c index 5d7684a94c..21a108d8c0 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -2250,6 +2250,12 @@ const VMStateDescription vmstate_vga_common = { } }; +static const GraphicHwOps vga_ops = { + .invalidate = vga_invalidate_display, + .gfx_update = vga_update_display, + .text_update = vga_update_text, +}; + void vga_common_init(VGACommonState *s) { int i, j, v, b; @@ -2293,9 +2299,7 @@ void vga_common_init(VGACommonState *s) s->get_bpp = vga_get_bpp; s->get_offsets = vga_get_offsets; s->get_resolution = vga_get_resolution; - s->update = vga_update_display; - s->invalidate = vga_invalidate_display; - s->text_update = vga_update_text; + s->hw_ops = &vga_ops; switch (vga_retrace_method) { case VGA_RETRACE_DUMB: s->retrace = vga_dumb_retrace; |