Commit c63fd348 authored by runge's avatar runge

x11vnc: lower waitms and defer if framebuffer reads are fast (> 100MB/s)

parent 65b42bb8
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -353,6 +353,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
* poll times of 10-35ms, so maybe this value cuts the idle load by 2 or so.
*/
int waitms = 20;
int got_waitms = 0;
double wait_ui = 2.0;
double slow_fb = 0.0;
double xrefresh = 0.0;
......
......@@ -258,6 +258,7 @@ extern int tile_shm_count;
extern int using_shm;
extern int flip_byte_order;
extern int waitms;
extern int got_waitms;
extern double wait_ui;
extern double slow_fb;
extern double xrefresh;
......
.\" This file was automatically generated from x11vnc -help output.
.TH X11VNC "1" "May 2008" "x11vnc " "User Commands"
.TH X11VNC "1" "June 2008" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.4, lastmod: 2008-05-31
version: 0.9.4, lastmod: 2008-06-01
.SH SYNOPSIS
.B x11vnc
[OPTION]...
......
......@@ -3222,6 +3222,7 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-wait")) {
CHECK_ARGC
waitms = atoi(argv[++i]);
got_waitms = 1;
} else if (!strcmp(arg, "-wait_ui")) {
CHECK_ARGC
wait_ui = atof(argv[++i]);
......@@ -4782,6 +4783,28 @@ if (0) fprintf(stderr, "XA: %s\n", getenv("XAUTHORITY"));
initialize_speeds();
if (speeds_read_rate_measured > 100) {
/* framebuffer read is fast at > 100 MB/sec */
if (! got_waitms) {
waitms /= 2;
if (waitms < 10) {
waitms = 10;
}
if (!quiet) {
rfbLog("fast read: reset wait ms to: %d\n", waitms);
}
}
if (! got_deferupdate && ! got_defer) {
if (defer_update > 15) {
defer_update = 15;
if (screen) {
screen->deferUpdateTime = defer_update;
}
rfbLog("fast read: reset defer ms to: %d\n", defer_update);
}
}
}
initialize_keyboard_and_pointer();
if (inetd && use_openssl) {
......
......@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.4 lastmod: 2008-05-31";
char lastmod[] = "0.9.4 lastmod: 2008-06-01";
/* X display info */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment