x11vnc: more -ncache improvements.

pull/1/head
runge 18 years ago
parent c88d830f55
commit 76a495aff1

@ -1,3 +1,6 @@
2007-01-03 Karl Runge <runge@karlrunge.com>
* x11vnc: more -ncache improvements.
2007-01-01 Karl Runge <runge@karlrunge.com> 2007-01-01 Karl Runge <runge@karlrunge.com>
* x11vnc: more -ncache improvements. * x11vnc: more -ncache improvements.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2007" "x11vnc " "User Commands" .TH X11VNC "1" "January 2007" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.8.4, lastmod: 2007-01-01 version: 0.8.4, lastmod: 2007-01-03
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...

@ -1,7 +1,7 @@
/* /*
* x11vnc: a VNC server for X displays. * x11vnc: a VNC server for X displays.
* *
* Copyright (c) 2002-2006 Karl J. Runge <runge@karlrunge.com> * Copyright (c) 2002-2007 Karl J. Runge <runge@karlrunge.com>
* All rights reserved. * All rights reserved.
* *
* This is free software; you can redistribute it and/or modify * This is free software; you can redistribute it and/or modify

@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.8.4 lastmod: 2007-01-01"; char lastmod[] = "0.8.4 lastmod: 2007-01-03";
/* X display info */ /* X display info */

@ -544,6 +544,8 @@ int xdamage_hint_skip(int y) {
static sraRegionPtr scanline = NULL; static sraRegionPtr scanline = NULL;
sraRegionPtr reg, tmpl; sraRegionPtr reg, tmpl;
int ret, i, n, nreg; int ret, i, n, nreg;
static int ncache_no_skip = 0;
static double last_ncache_no_skip = 0.0;
if (! xdamage_present || ! use_xdamage) { if (! xdamage_present || ! use_xdamage) {
return 0; /* cannot skip */ return 0; /* cannot skip */
@ -557,9 +559,26 @@ int xdamage_hint_skip(int y) {
scanline = sraRgnCreate(); scanline = sraRgnCreate();
} }
nreg = (xdamage_memory * NSCAN) + 1;
if (ncache > 0) {
if (ncache_no_skip == 0) {
if (dnow() > last_ncache_no_skip + 4.0) {
ncache_no_skip = 1;
last_ncache_no_skip = dnow();
return 0;
}
} else {
if (++ncache_no_skip >= 2*nreg) {
ncache_no_skip = 0;
} else {
return 0;
}
}
}
tmpl = sraRgnCreateRect(0, y, dpy_x, y+1); tmpl = sraRgnCreateRect(0, y, dpy_x, y+1);
nreg = (xdamage_memory * NSCAN) + 1;
ret = 1; ret = 1;
for (i=0; i<nreg; i++) { for (i=0; i<nreg; i++) {
/* go back thru the history starting at most recent */ /* go back thru the history starting at most recent */

Loading…
Cancel
Save