diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-02-06 18:28:10 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-02-13 16:15:09 +0100 |
commit | f7189ac8e6bcc34a7957b1dae7ea3fbcb138fc50 (patch) | |
tree | 005ca1d4e4609cb9dea6e1a54d6fe938d771cc8b /hw/display/g364fb.c | |
parent | 1e23b63f022ae79d7a5c535fe549127ad52d5ba6 (diff) | |
download | qemu-f7189ac8e6bcc34a7957b1dae7ea3fbcb138fc50.zip qemu-f7189ac8e6bcc34a7957b1dae7ea3fbcb138fc50.tar.gz qemu-f7189ac8e6bcc34a7957b1dae7ea3fbcb138fc50.tar.bz2 |
g364fb: switch to using DirtyBitmapSnapshot
This removes the last user of memory_region_test_and_clear_dirty
outside memory.c.
Tested-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/display/g364fb.c')
-rw-r--r-- | hw/display/g364fb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c index 86557d1..86452de 100644 --- a/hw/display/g364fb.c +++ b/hw/display/g364fb.c @@ -62,15 +62,15 @@ typedef struct G364State { #define G364_PAGE_SIZE 4096 -static inline int check_dirty(G364State *s, ram_addr_t page) +static inline int check_dirty(G364State *s, DirtyBitmapSnapshot *snap, ram_addr_t page) { - return memory_region_test_and_clear_dirty(&s->mem_vram, page, G364_PAGE_SIZE, - DIRTY_MEMORY_VGA); + return memory_region_snapshot_get_dirty(&s->mem_vram, snap, page, G364_PAGE_SIZE); } static void g364fb_draw_graphic8(G364State *s) { DisplaySurface *surface = qemu_console_surface(s->con); + DirtyBitmapSnapshot *snap; int i, w; uint8_t *vram; uint8_t *data_display, *dd; @@ -122,8 +122,10 @@ static void g364fb_draw_graphic8(G364State *s) vram = s->vram + s->top_of_screen; /* XXX: out of range in vram? */ data_display = dd = surface_data(surface); + snap = memory_region_snapshot_and_clear_dirty(&s->mem_vram, 0, s->vram_size, + DIRTY_MEMORY_VGA); while (y < s->height) { - if (check_dirty(s, page)) { + if (check_dirty(s, snap, page)) { if (y < ymin) ymin = ymax = y; if (x < xmin) |