Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
c9e24e5b
Commit
c9e24e5b
authored
Jan 09, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more speed and accuracy improvements to -ncache mode.
parent
5b607a44
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
773 additions
and
390 deletions
+773
-390
README
x11vnc/README
+291
-257
help.c
x11vnc/help.c
+4
-0
options.c
x11vnc/options.c
+5
-0
options.h
x11vnc/options.h
+1
-0
remote.c
x11vnc/remote.c
+2
-0
screen.c
x11vnc/screen.c
+11
-6
solid.c
x11vnc/solid.c
+15
-7
solid.h
x11vnc/solid.h
+1
-0
userinput.c
x11vnc/userinput.c
+421
-116
x11vnc.1
x11vnc/x11vnc.1
+5
-1
x11vnc.c
x11vnc/x11vnc.c
+6
-1
x11vnc_defs.c
x11vnc/x11vnc_defs.c
+1
-1
xdamage.c
x11vnc/xdamage.c
+10
-1
No files found.
x11vnc/README
View file @
c9e24e5b
This diff is collapsed.
Click to expand it.
x11vnc/help.c
View file @
c9e24e5b
...
...
@@ -2064,6 +2064,10 @@ void print_help(int mode) {
" smoother drags than tightvnc viewer. Response may also
\n
"
" be choppy if the server side machine is too slow.
\n
"
"
\n
"
" Sometimes on very slow modem connections, this actually
\n
"
" gives an improvement because no pixel data at all
\n
"
" (not even the box animation) is sent during the drag.
\n
"
"
\n
"
"-ncache_no_moveraise In -ncache mode, do not assume that moving a window
\n
"
" will cause the window manager to raise it to the top
\n
"
" of the stack. The default is to assume it does, and
\n
"
...
...
x11vnc/options.c
View file @
c9e24e5b
...
...
@@ -195,8 +195,12 @@ int wireframe_in_progress = 0;
int
wireframe_local
=
1
;
#ifndef NCACHE
#ifdef NO_NCACHE
#define NCACHE 0
#else
#define NCACHE -12
#endif
#endif
#ifdef MACOSX
int
ncache
=
0
;
int
ncache_pad
=
24
;
...
...
@@ -204,6 +208,7 @@ int ncache_pad = 24;
int
ncache
=
NCACHE
;
int
ncache_pad
=
0
;
#endif
int
ncache_xrootpmap
=
1
;
int
ncache0
=
0
;
int
ncache_copyrect
=
0
;
int
ncache_wf_raises
=
1
;
...
...
x11vnc/options.h
View file @
c9e24e5b
...
...
@@ -162,6 +162,7 @@ extern int ncache_copyrect;
extern
int
ncache_wf_raises
;
extern
int
ncache_dt_change
;
extern
int
ncache_pad
;
extern
int
ncache_xrootpmap
;
extern
int
macosx_ncache_macmenu
;
extern
int
ncache_beta_tester
;
...
...
x11vnc/remote.c
View file @
c9e24e5b
...
...
@@ -2733,6 +2733,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog
(
"remote_cmd: enabling mouse nodragging mode.
\n
"
);
show_dragging
=
0
;
#ifndef NO_NCACHE
}
else
if
(
!
strcmp
(
p
,
"ncache_cr"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
ncache_copyrect
);
...
...
@@ -2810,6 +2811,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
check_ncache
(
1
,
0
);
}
}
#endif
}
else
if
(
strstr
(
p
,
"wireframe_mode"
)
==
p
)
{
COLON_CHECK
(
"wireframe_mode:"
)
...
...
x11vnc/screen.c
View file @
c9e24e5b
...
...
@@ -2059,23 +2059,28 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
#ifndef NO_NCACHE
if
(
ncache
>
0
&&
!
nofb
)
{
#ifdef MACOSX
#
ifdef MACOSX
if
(
!
raw_fb_str
||
macosx_console
)
{
#else
#
else
if
(
!
raw_fb_str
)
{
#endif
#
endif
char
*
new_fb
;
int
sz
=
fb
->
height
*
fb
->
bytes_per_line
;
int
ns
=
1
+
ncache
;
if
(
ncache_xrootpmap
)
{
ns
++
;
}
new_fb
=
(
char
*
)
calloc
((
size_t
)
(
sz
*
(
1
+
ncache
)
),
1
);
new_fb
=
(
char
*
)
calloc
((
size_t
)
(
sz
*
ns
),
1
);
if
(
fb
->
data
)
{
memcpy
(
new_fb
,
fb
->
data
,
sz
);
free
(
fb
->
data
);
}
fb
->
data
=
new_fb
;
fb
->
height
*=
(
1
+
ncache
);
height
*=
(
1
+
ncache
);
fb
->
height
*=
(
ns
);
height
*=
(
ns
);
ncache0
=
ncache
;
}
}
...
...
x11vnc/solid.c
View file @
c9e24e5b
...
...
@@ -13,7 +13,7 @@ void solid_bg(int restore);
static
void
usr_bin_path
(
int
restore
);
static
int
dt_cmd
(
char
*
cmd
);
static
char
*
cmd_output
(
char
*
cmd
);
static
void
solid_root
(
char
*
color
);
XImage
*
solid_root
(
char
*
color
);
static
void
solid_cde
(
char
*
color
);
static
void
solid_gnome
(
char
*
color
);
static
void
solid_kde
(
char
*
color
);
...
...
@@ -113,11 +113,11 @@ static char *cmd_output(char *cmd) {
return
(
output
);
}
static
void
solid_root
(
char
*
color
)
{
XImage
*
solid_root
(
char
*
color
)
{
#if NO_X11
RAWFB_RET_VOID
if
(
!
color
)
{}
return
;
return
NULL
;
#else
Window
expose
;
static
XImage
*
image
=
NULL
;
...
...
@@ -130,11 +130,11 @@ static void solid_root(char *color) {
XColor
cdef
;
Colormap
cmap
;
RAWFB_RET
_VOID
RAWFB_RET
(
NULL
)
if
(
subwin
||
window
!=
rootwin
)
{
rfbLog
(
"cannot set subwin to solid color, must be rootwin
\n
"
);
return
;
return
NULL
;
}
/* create the "clear" window just for generating exposures */
...
...
@@ -155,7 +155,7 @@ static void solid_root(char *color) {
/* whoops */
XDestroyWindow
(
dpy
,
expose
);
rfbLog
(
"no root snapshot available.
\n
"
);
return
;
return
NULL
;
}
...
...
@@ -180,7 +180,7 @@ static void solid_root(char *color) {
XMapWindow
(
dpy
,
expose
);
XSync
(
dpy
,
False
);
XDestroyWindow
(
dpy
,
expose
);
return
;
return
NULL
;
}
if
(
!
image
)
{
...
...
@@ -205,6 +205,13 @@ static void solid_root(char *color) {
ZPixmap
);
XSync
(
dpy
,
False
);
XDestroyWindow
(
dpy
,
iwin
);
rfbLog
(
"done.
\n
"
);
}
if
(
color
==
(
char
*
)
0x1
)
{
/* caller will XDestroyImage it: */
XImage
*
xi
=
image
;
image
=
NULL
;
return
xi
;
}
/* use black for low colors or failure */
...
...
@@ -225,6 +232,7 @@ static void solid_root(char *color) {
XSync
(
dpy
,
False
);
XDestroyWindow
(
dpy
,
expose
);
#endif
/* NO_X11 */
return
NULL
;
}
static
void
solid_cde
(
char
*
color
)
{
...
...
x11vnc/solid.h
View file @
c9e24e5b
...
...
@@ -5,5 +5,6 @@
extern
char
*
guess_desktop
(
void
);
extern
void
solid_bg
(
int
restore
);
extern
XImage
*
solid_root
(
char
*
color
);
#endif
/* _X11VNC_SOLID_H */
x11vnc/userinput.c
View file @
c9e24e5b
This diff is collapsed.
Click to expand it.
x11vnc/x11vnc.1
View file @
c9e24e5b
...
...
@@ -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-0
7
version: 0.8.4, lastmod: 2007-01-0
8
.SH SYNOPSIS
.B x11vnc
[OPTION]...
...
...
@@ -2428,6 +2428,10 @@ Some VNC Viewers provide better response than others
with this option. On Unix, realvnc viewer gives
smoother drags than tightvnc viewer. Response may also
be choppy if the server side machine is too slow.
.IP
Sometimes on very slow modem connections, this actually
gives an improvement because no pixel data at all
(not even the box animation) is sent during the drag.
.PP
\fB-ncache_no_moveraise\fR
.IP
...
...
x11vnc/x11vnc.c
View file @
c9e24e5b
...
...
@@ -1463,6 +1463,8 @@ char msg[] =
"
\n
"
" x11vnc -ncache 0 ...
\n
"
"
\n
"
"Your current setting is: -ncache %d
\n
"
"
\n
"
"The feature needs additional testing because we want to have x11vnc
\n
"
"performance enhancements on by default. Otherwise, only a relative few
\n
"
"would notice and use the -ncache option (e.g. the wireframe and scroll
\n
"
...
...
@@ -1483,8 +1485,11 @@ char msg[] =
if
(
nofb
)
{
return
;
}
#ifdef NO_NCACHE
return
;
#endif
fprintf
(
stderr
,
"%s"
,
msg
);
fprintf
(
stderr
,
msg
,
ncache
);
}
...
...
x11vnc/x11vnc_defs.c
View file @
c9e24e5b
...
...
@@ -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-0
7
"
;
char
lastmod
[]
=
"0.8.4 lastmod: 2007-01-0
8
"
;
/* X display info */
...
...
x11vnc/xdamage.c
View file @
c9e24e5b
...
...
@@ -546,6 +546,7 @@ int xdamage_hint_skip(int y) {
int
ret
,
i
,
n
,
nreg
;
static
int
ncache_no_skip
=
0
;
static
double
last_ncache_no_skip
=
0
.
0
;
static
double
last_ncache_no_skip_long
=
0
.
0
,
ncache_fac
=
0
.
25
;
if
(
!
xdamage_present
||
!
use_xdamage
)
{
return
0
;
/* cannot skip */
...
...
@@ -561,6 +562,7 @@ int xdamage_hint_skip(int y) {
nreg
=
(
xdamage_memory
*
NSCAN
)
+
1
;
#ifndef NO_NCACHE
if
(
ncache
>
0
)
{
if
(
ncache_no_skip
==
0
)
{
double
now
=
dnow
();
...
...
@@ -575,16 +577,23 @@ int xdamage_hint_skip(int y) {
}
if
(
ncache_no_skip
)
{
last_ncache_no_skip
=
dnow
();
if
(
now
>
last_ncache_no_skip_long
+
60
.
0
)
{
ncache_fac
=
2
.
0
;
last_ncache_no_skip_long
=
now
;
}
else
{
ncache_fac
=
0
.
25
;
}
return
0
;
}
}
else
{
if
(
ncache_no_skip
++
>=
1
*
nreg
+
4
)
{
if
(
ncache_no_skip
++
>=
ncache_fac
*
nreg
+
4
)
{
ncache_no_skip
=
0
;
}
else
{
return
0
;
}
}
}
#endif
tmpl
=
sraRgnCreateRect
(
0
,
y
,
dpy_x
,
y
+
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment