static void vmsvga_update_display(void *opaque)

{

    struct vmsvga_state_s *s = opaque;

    DisplaySurface *surface;

    bool dirty = false;



    if (!s->enable) {

        s->vga.hw_ops->gfx_update(&s->vga);

        return;

    }



    vmsvga_check_size(s);

    surface = qemu_console_surface(s->vga.con);



    vmsvga_fifo_run(s);

    vmsvga_update_rect_flush(s);



    /*

     * Is it more efficient to look at vram VGA-dirty bits or wait

     * for the driver to issue SVGA_CMD_UPDATE?

     */

    if (memory_region_is_logging(&s->vga.vram)) {

        vga_sync_dirty_bitmap(&s->vga);

        dirty = memory_region_get_dirty(&s->vga.vram, 0,

            surface_stride(surface) * surface_height(surface),

            DIRTY_MEMORY_VGA);

    }

    if (s->invalidated || dirty) {

        s->invalidated = 0;

        dpy_gfx_update(s->vga.con, 0, 0,

                   surface_width(surface), surface_height(surface));

    }

    if (dirty) {

        memory_region_reset_dirty(&s->vga.vram, 0,

            surface_stride(surface) * surface_height(surface),

            DIRTY_MEMORY_VGA);

    }

}

static void vmsvga_update_display(void *opaque)

{

    struct vmsvga_state_s *s = opaque;

    DisplaySurface *surface;

    bool dirty = false;



    if (!s->enable) {

        s->vga.hw_ops->gfx_update(&s->vga);

        return;

    }



    vmsvga_check_size(s);

    surface = qemu_console_surface(s->vga.con);



    vmsvga_fifo_run(s);

    vmsvga_update_rect_flush(s);



    







    if (memory_region_is_logging(&s->vga.vram)) {

        vga_sync_dirty_bitmap(&s->vga);

        dirty = memory_region_get_dirty(&s->vga.vram, 0,

            surface_stride(surface) * surface_height(surface),

            DIRTY_MEMORY_VGA);

    }

    if (s->invalidated || dirty) {

        s->invalidated = 0;

        dpy_gfx_update(s->vga.con, 0, 0,

                   surface_width(surface), surface_height(surface));

    }

    if (dirty) {

        memory_region_reset_dirty(&s->vga.vram, 0,

            surface_stride(surface) * surface_height(surface),

            DIRTY_MEMORY_VGA);

    }

}

static void FUNC_0(void *VAR_0)

{

    struct vmsvga_state_s *VAR_1 = VAR_0;

    DisplaySurface *surface;

    bool dirty = false;



    if (!VAR_1->enable) {

        VAR_1->vga.hw_ops->gfx_update(&VAR_1->vga);

        return;

    }



    vmsvga_check_size(VAR_1);

    surface = qemu_console_surface(VAR_1->vga.con);



    vmsvga_fifo_run(VAR_1);

    vmsvga_update_rect_flush(VAR_1);



    







    if (memory_region_is_logging(&VAR_1->vga.vram)) {

        vga_sync_dirty_bitmap(&VAR_1->vga);

        dirty = memory_region_get_dirty(&VAR_1->vga.vram, 0,

            surface_stride(surface) * surface_height(surface),

            DIRTY_MEMORY_VGA);

    }

    if (VAR_1->invalidated || dirty) {

        VAR_1->invalidated = 0;

        dpy_gfx_update(VAR_1->vga.con, 0, 0,

                   surface_width(surface), surface_height(surface));

    }

    if (dirty) {

        memory_region_reset_dirty(&VAR_1->vga.vram, 0,

            surface_stride(surface) * surface_height(surface),

            DIRTY_MEMORY_VGA);

    }

}

static void FUNC_0(void *VAR_0)
{ struct vmsvga_state_s *VAR_1 = VAR_0; DisplaySurface *surface; bool dirty = false; if (!VAR_1->enable) { VAR_1->vga.hw_ops->gfx_update(&VAR_1->vga); return; } vmsvga_check_size(VAR_1); surface = qemu_console_surface(VAR_1->vga.con); vmsvga_fifo_run(VAR_1); vmsvga_update_rect_flush(VAR_1); if (memory_region_is_logging(&VAR_1->vga.vram)) { vga_sync_dirty_bitmap(&VAR_1->vga); dirty = memory_region_get_dirty(&VAR_1->vga.vram, 0,
surface_stride(surface) * surface_height(surface),
DIRTY_MEMORY_VGA); } if (VAR_1->invalidated || dirty) { VAR_1->invalidated = 0; dpy_gfx_update(VAR_1->vga.con, 0, 0,
surface_width(surface), surface_height(surface)); } if (dirty) { memory_region_reset_dirty(&VAR_1->vga.vram, 0,
surface_stride(surface) * surface_height(surface),
DIRTY_MEMORY_VGA); } }