diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-24 12:43:45 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-24 13:36:05 -0600 |
commit | 45efb16124efef51de5157afc31984b5a47700f9 (patch) | |
tree | 3f391912a9c7d6172c3abf861bf2e56accdf8aae /hw/blizzard.c | |
parent | 167351020420c285b67cdf0603501b3d3b15e3f7 (diff) |
optimize screendump for the common non-switch case
switch console only if needed, also pass down whenever the console was
switched or not because a displaysurface redraw is only needed in case
the console was switched.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/blizzard.c')
-rw-r--r-- | hw/blizzard.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/blizzard.c b/hw/blizzard.c index b2c1b22844..c7d844d105 100644 --- a/hw/blizzard.c +++ b/hw/blizzard.c @@ -932,10 +932,14 @@ static void blizzard_update_display(void *opaque) s->my[1] = 0; } -static void blizzard_screen_dump(void *opaque, const char *filename) { +static void blizzard_screen_dump(void *opaque, const char *filename, + bool cswitch) +{ BlizzardState *s = (BlizzardState *) opaque; - blizzard_update_display(opaque); + if (cswitch) { + blizzard_update_display(opaque); + } if (s && ds_get_data(s->state)) ppm_save(filename, s->state->surface); } |