summaryrefslogtreecommitdiffstats
path: root/x11vnc/xdamage.c
diff options
context:
space:
mode:
authorrunge <runge>2007-01-07 20:05:28 +0000
committerrunge <runge>2007-01-07 20:05:28 +0000
commit5b607a444900246dfcc8497da4d8ef1e41bedda6 (patch)
tree14fc3006cf1d13aaafc22d182d3a32cea7eef09b /x11vnc/xdamage.c
parent76a495aff1a1e923363a865bd5b9a0a95332374d (diff)
downloadlibtdevnc-5b607a444900246dfcc8497da4d8ef1e41bedda6.tar.gz
libtdevnc-5b607a444900246dfcc8497da4d8ef1e41bedda6.zip
changes to ncache cache aging and xdamage skipping
Diffstat (limited to 'x11vnc/xdamage.c')
-rw-r--r--x11vnc/xdamage.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/x11vnc/xdamage.c b/x11vnc/xdamage.c
index 2343a98..08e2278 100644
--- a/x11vnc/xdamage.c
+++ b/x11vnc/xdamage.c
@@ -563,13 +563,22 @@ int xdamage_hint_skip(int y) {
if (ncache > 0) {
if (ncache_no_skip == 0) {
- if (dnow() > last_ncache_no_skip + 4.0) {
+ double now = dnow();
+ if (now > last_ncache_no_skip + 8.0) {
ncache_no_skip = 1;
+ } else if (now < last_bs_restore + 0.5) {
+ ncache_no_skip = 1;
+ } else if (now < last_su_restore + 0.5) {
+ ncache_no_skip = 1;
+ } else if (now < last_copyrect + 0.5) {
+ ncache_no_skip = 1;
+ }
+ if (ncache_no_skip) {
last_ncache_no_skip = dnow();
return 0;
}
} else {
- if (++ncache_no_skip >= 2*nreg) {
+ if (ncache_no_skip++ >= 1*nreg + 4) {
ncache_no_skip = 0;
} else {
return 0;