From 0f7b2864d0d0c3ef2801f9214d8c510c80a220d1 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 14 Mar 2013 11:56:16 +0100 Subject: console: gui timer fixes Make gui update rate adaption code in gui_update() actually work. Sprinkle in a tracepoint so you can see the code at work. Remove the update rate adaption code in vnc and make vnc simply use the generic bits instead. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/ui/console.h') diff --git a/include/ui/console.h b/include/ui/console.h index f3e779193c..3cb00180ae 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -21,7 +21,8 @@ #define QEMU_CAPS_LOCK_LED (1 << 2) /* in ms */ -#define GUI_REFRESH_INTERVAL 30 +#define GUI_REFRESH_INTERVAL_DEFAULT 30 +#define GUI_REFRESH_INTERVAL_IDLE 3000 typedef void QEMUPutKBDEvent(void *opaque, int keycode); typedef void QEMUPutLEDEvent(void *opaque, int ledstate); @@ -174,8 +175,7 @@ typedef struct DisplayChangeListenerOps { } DisplayChangeListenerOps; struct DisplayChangeListener { - int idle; - uint64_t gui_timer_interval; + uint64_t update_interval; const DisplayChangeListenerOps *ops; DisplayState *ds; @@ -207,12 +207,13 @@ static inline int is_buffer_shared(DisplaySurface *surface) void register_displaychangelistener(DisplayState *ds, DisplayChangeListener *dcl); +void update_displaychangelistener(DisplayChangeListener *dcl, + uint64_t interval); void unregister_displaychangelistener(DisplayChangeListener *dcl); void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h); void dpy_gfx_replace_surface(QemuConsole *con, DisplaySurface *surface); -void dpy_refresh(DisplayState *s); void dpy_gfx_copy(QemuConsole *con, int src_x, int src_y, int dst_x, int dst_y, int w, int h); void dpy_text_cursor(QemuConsole *con, int x, int y); -- cgit v1.2.3