WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ioemu: Slown down refresh interval when S

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: Slown down refresh interval when SDL is minimized
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 05 Mar 2008 05:20:11 -0800
Delivery-date: Wed, 05 Mar 2008 05:20:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204710183 0
# Node ID 854b0704962bcad84a431f0c8c0f597b2e2a8e93
# Parent  2909b03e05de48c39defaf05e4555f29a3e454e2
ioemu: Slown down refresh interval when SDL is minimized
as that saves us the VGA refresh scanning.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/ioemu/sdl.c |    9 +++++++++
 tools/ioemu/vl.c  |    6 +++++-
 tools/ioemu/vl.h  |    1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff -r 2909b03e05de -r 854b0704962b tools/ioemu/sdl.c
--- a/tools/ioemu/sdl.c Tue Mar 04 13:30:07 2008 +0000
+++ b/tools/ioemu/sdl.c Wed Mar 05 09:43:03 2008 +0000
@@ -518,6 +518,15 @@ static void sdl_refresh(DisplayState *ds
                 !ev->active.gain && !gui_fullscreen_initial_grab) {
                 sdl_grab_end();
             }
+           if (ev->active.state & SDL_APPACTIVE) {
+               if (ev->active.gain) {
+                   /* Back to default interval */
+                   ds->gui_timer_interval = 0;
+               } else {
+                   /* Sleeping interval */
+                   ds->gui_timer_interval = 500;
+               }
+           }
             break;
         default:
             break;
diff -r 2909b03e05de -r 854b0704962b tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Tue Mar 04 13:30:07 2008 +0000
+++ b/tools/ioemu/vl.c  Wed Mar 05 09:43:03 2008 +0000
@@ -6125,7 +6125,11 @@ void gui_update(void *opaque)
 void gui_update(void *opaque)
 {
     display_state.dpy_refresh(&display_state);
-    qemu_mod_timer(gui_timer, GUI_REFRESH_INTERVAL + qemu_get_clock(rt_clock));
+    qemu_mod_timer(gui_timer,
+            (display_state.gui_timer_interval ?
+                display_state.gui_timer_interval :
+                GUI_REFRESH_INTERVAL)
+            + qemu_get_clock(rt_clock));
 }
 
 struct vm_change_state_entry {
diff -r 2909b03e05de -r 854b0704962b tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Tue Mar 04 13:30:07 2008 +0000
+++ b/tools/ioemu/vl.h  Wed Mar 05 09:43:03 2008 +0000
@@ -935,6 +935,7 @@ struct DisplayState {
     int width;
     int height;
     void *opaque;
+    uint64_t gui_timer_interval;
 
     int switchbpp;
     int shared_buf;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: Slown down refresh interval when SDL is minimized, Xen patchbot-unstable <=