[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save
From: |
Alon Levy |
Subject: |
[Qemu-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save |
Date: |
Tue, 21 Feb 2012 23:39:32 +0200 |
Using vga->screen_dump results in a number of calls to ppm_save,
instead of a single one. Lacking time to test all the possible users of
vga->screen_dump, avoid the redundant calls by doing the vga_hw_update+
ppm_save in qxl_hw_screen_dump.
Signed-off-by: Alon Levy <address@hidden>
---
hw/qxl.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index ac69125..8bdc510 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1438,7 +1438,6 @@ static void qxl_hw_invalidate(void *opaque)
static void qxl_hw_screen_dump(void *opaque, const char *filename)
{
PCIQXLDevice *qxl = opaque;
- VGACommonState *vga = &qxl->vga;
switch (qxl->mode) {
case QXL_MODE_COMPAT:
@@ -1447,7 +1446,14 @@ static void qxl_hw_screen_dump(void *opaque, const char
*filename)
ppm_save(filename, qxl->ssd.ds->surface);
break;
case QXL_MODE_VGA:
- vga->screen_dump(vga, filename);
+ /*
+ * TODO: vga_hw_screen_dump needless does a number of ppm_save calls
+ * fix it instead of redoing it correctly here (needs testing which is
+ * why it isn't yet done)
+ */
+ qxl->vga.invalidate(&qxl->vga);
+ vga_hw_update();
+ ppm_save(filename, qxl->ssd.ds->surface);
break;
default:
break;
--
1.7.9.1
- [Qemu-devel] [RFC v4 0/9] qxl: fix hangs caused by qxl_render_update, Alon Levy, 2012/02/21
- [Qemu-devel] [RFC v4 1/9] console: don't call console_select unnecessarily, Alon Levy, 2012/02/21
- [Qemu-devel] [RFC v4 2/9] sdl: remove NULL check, g_malloc0 can't fail, Alon Levy, 2012/02/21
- [Qemu-devel] [RFC v4 3/9] qxl: drop qxl_spice_update_area_async definition, Alon Levy, 2012/02/21
- [Qemu-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save,
Alon Levy <=
- Re: [Qemu-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save, Gerd Hoffmann, 2012/02/22
- Re: [Qemu-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save, Alon Levy, 2012/02/22
- Re: [Qemu-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save, Gerd Hoffmann, 2012/02/22
- Re: [Qemu-devel] [Spice-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save, Alon Levy, 2012/02/22
- Re: [Qemu-devel] [Spice-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save, Gerd Hoffmann, 2012/02/22
- Re: [Qemu-devel] [Spice-devel] [RFC v4 4/9] qxl: screen_dump in vga: do a single ppm_save, Alon Levy, 2012/02/22
[Qemu-devel] [RFC v4 6/9] qxl: remove flipped, Alon Levy, 2012/02/21