Commit 76a495af authored by runge's avatar runge

x11vnc: more -ncache improvements.

parent c88d830f
2007-01-03 Karl Runge <runge@karlrunge.com>
* x11vnc: more -ncache improvements.
2007-01-01 Karl Runge <runge@karlrunge.com>
* x11vnc: more -ncache improvements.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2007" "x11vnc " "User Commands"
.SH NAME
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
.B x11vnc
[OPTION]...
......
/*
* 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.
*
* 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;
/* 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 */
......
......@@ -544,6 +544,8 @@ int xdamage_hint_skip(int y) {
static sraRegionPtr scanline = NULL;
sraRegionPtr reg, tmpl;
int ret, i, n, nreg;
static int ncache_no_skip = 0;
static double last_ncache_no_skip = 0.0;
if (! xdamage_present || ! use_xdamage) {
return 0; /* cannot skip */
......@@ -557,9 +559,26 @@ int xdamage_hint_skip(int y) {
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);
nreg = (xdamage_memory * NSCAN) + 1;
ret = 1;
for (i=0; i<nreg; i++) {
/* go back thru the history starting at most recent */
......
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