Commit 0fe1eca7 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

memory: hide memory_region_sync_dirty_bitmap behind DirtyBitmapSnapshot



Simplify the users of memory_region_snapshot_and_clear_dirty, so
that they do not have to call memory_region_sync_dirty_bitmap
explicitly.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 77302fb5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -108,7 +108,6 @@ static void cg3_update_display(void *opaque)
    data = (uint32_t *)surface_data(surface);

    if (!s->full_update) {
        memory_region_sync_dirty_bitmap(&s->vram_mem);
        snap = memory_region_snapshot_and_clear_dirty(&s->vram_mem, 0x0,
                                              memory_region_size(&s->vram_mem),
                                              DIRTY_MEMORY_VGA);
+0 −1
Original line number Diff line number Diff line
@@ -1289,7 +1289,6 @@ static void exynos4210_fimd_update(void *opaque)
            scrn_width = w->virtpage_width;
            /* Total width of virtual screen page in bytes */
            inc_size = scrn_width + w->virtpage_offsize;
            memory_region_sync_dirty_bitmap(w->mem_section.mr);
            host_fb_addr = w->host_fb_addr;
            fb_line_addr = w->mem_section.offset_within_region;
            snap = memory_region_snapshot_and_clear_dirty(w->mem_section.mr,
+0 −1
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@ void framebuffer_update_display(
    if (!mem) {
        return;
    }
    memory_region_sync_dirty_bitmap(mem);

    addr = mem_section->offset_within_region;
    src = memory_region_get_ram_ptr(mem) + addr;
+0 −1
Original line number Diff line number Diff line
@@ -246,7 +246,6 @@ static void g364fb_update_display(void *opaque)
        qemu_console_resize(s->con, s->width, s->height);
    }

    memory_region_sync_dirty_bitmap(&s->mem_vram);
    if (s->ctla & CTLA_FORCE_BLANK) {
        g364fb_draw_blank(s);
    } else if (s->depth == 8) {
+0 −1
Original line number Diff line number Diff line
@@ -1508,7 +1508,6 @@ static void sm501_update_display(void *opaque)
    }

    /* draw each line according to conditions */
    memory_region_sync_dirty_bitmap(&s->local_mem_region);
    snap = memory_region_snapshot_and_clear_dirty(&s->local_mem_region,
              offset, width * height * src_bpp, DIRTY_MEMORY_VGA);
    for (y = 0, offset = 0; y < height; y++, offset += width * src_bpp) {
Loading