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
34fc97a5
Commit
34fc97a5
authored
Jan 21, 2004
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add "-progressive height" option to make SendFramebufferUpdate "preemptive"
parent
3a472f88
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
4 deletions
+46
-4
ChangeLog
ChangeLog
+1
-0
cargs.c
cargs.c
+7
-0
main.c
main.c
+7
-4
rfb.h
rfb/rfb.h
+9
-0
rfbserver.c
rfbserver.c
+22
-0
No files found.
ChangeLog
View file @
34fc97a5
...
...
@@ -2,6 +2,7 @@
* do not send unneccessary updates when drawing a cursor
* ignore SIGPIPE; it is handled by EPIPE
* add an example how to use rfbDoCopyRect
* add experimental progressive updating (off by default)
2004-01-19 Karl Runge <runge@karlrunge.com>
* handle mouse button number mismatch
...
...
cargs.c
View file @
34fc97a5
...
...
@@ -35,6 +35,7 @@ rfbUsage(void)
fprintf
(
stderr
,
"-httpdir dir-path enable http server using dir-path home
\n
"
);
fprintf
(
stderr
,
"-httpport portnum use portnum for http connection
\n
"
);
fprintf
(
stderr
,
"-enablehttpproxy enable http proxy support
\n
"
);
fprintf
(
stderr
,
"-progressive height enable progressive updating for slow links
\n
"
);
}
/* purges COUNT arguments from ARGV at POSITION and decrements ARGC.
...
...
@@ -119,6 +120,12 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
rfbScreen
->
httpPort
=
atoi
(
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-enablehttpproxy"
)
==
0
)
{
rfbScreen
->
httpEnableProxyConnect
=
TRUE
;
}
else
if
(
strcmp
(
argv
[
i
],
"-progressive"
)
==
0
)
{
/* -httpport portnum */
if
(
i
+
1
>=
*
argc
)
{
rfbUsage
();
return
FALSE
;
}
rfbScreen
->
progressiveSliceHeight
=
atoi
(
argv
[
++
i
]);
}
else
{
/* we just remove the processed arguments from the list */
if
(
i
!=
i1
)
...
...
main.c
View file @
34fc97a5
...
...
@@ -589,6 +589,11 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
rfbScreen
->
passwordCheck
=
defaultPasswordCheck
;
rfbScreen
->
ignoreSIGPIPE
=
TRUE
;
/* disable progressive updating per default */
rfbScreen
->
progressiveSliceHeight
=
0
;
if
(
!
rfbProcessArguments
(
rfbScreen
,
argc
,
argv
))
{
free
(
rfbScreen
);
return
0
;
...
...
@@ -638,8 +643,6 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
/* initialize client list and iterator mutex */
rfbClientListInit
(
rfbScreen
);
rfbScreen
->
ignoreSIGPIPE
=
TRUE
;
return
(
rfbScreen
);
}
...
...
@@ -801,7 +804,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
while
(
cl
)
{
if
(
cl
->
sock
>=
0
&&
!
cl
->
onHold
&&
FB_UPDATE_PENDING
(
cl
)
&&
!
sraRgnEmpty
(
cl
->
requestedRegion
))
{
if
(
cl
->
s
creen
->
rfbDeferUpdateTime
==
0
)
{
if
(
rfbS
creen
->
rfbDeferUpdateTime
==
0
)
{
rfbSendFramebufferUpdate
(
cl
,
cl
->
modifiedRegion
);
}
else
if
(
cl
->
startDeferring
.
tv_usec
==
0
)
{
gettimeofday
(
&
cl
->
startDeferring
,
NULL
);
...
...
@@ -812,7 +815,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
if
(
tv
.
tv_sec
<
cl
->
startDeferring
.
tv_sec
/* at midnight */
||
((
tv
.
tv_sec
-
cl
->
startDeferring
.
tv_sec
)
*
1000
+
(
tv
.
tv_usec
-
cl
->
startDeferring
.
tv_usec
)
/
1000
)
>
cl
->
s
creen
->
rfbDeferUpdateTime
)
{
>
rfbS
creen
->
rfbDeferUpdateTime
)
{
cl
->
startDeferring
.
tv_usec
=
0
;
rfbSendFramebufferUpdate
(
cl
,
cl
->
modifiedRegion
);
}
...
...
rfb/rfb.h
View file @
34fc97a5
...
...
@@ -274,7 +274,13 @@ typedef struct _rfbScreenInfo
rfbBool
backgroundLoop
;
#endif
/* if TRUE, an ignoring signal handler is installed for SIGPIPE */
rfbBool
ignoreSIGPIPE
;
/* if not zero, only a slice of this height is processed every time
* an update should be sent. This should make working on a slow
* link more interactive. */
int
progressiveSliceHeight
;
}
rfbScreenInfo
,
*
rfbScreenInfoPtr
;
...
...
@@ -469,6 +475,9 @@ typedef struct _rfbClientRec {
void
*
zrleData
;
#endif
/* if progressive updating is on, this variable holds the current
* y coordinate of the progressive slice. */
int
progressiveSliceY
;
}
rfbClientRec
,
*
rfbClientPtr
;
/*
...
...
rfbserver.c
View file @
34fc97a5
...
...
@@ -340,6 +340,8 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUDP)
cl
->
zlibCompressLevel
=
5
;
#endif
cl
->
progressiveSliceY
=
0
;
sprintf
(
pv
,
rfbProtocolVersionFormat
,
rfbProtocolMajorVersion
,
rfbProtocolMinorVersion
);
...
...
@@ -1109,6 +1111,26 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
*/
updateRegion
=
sraRgnCreateRgn
(
givenUpdateRegion
);
if
(
cl
->
screen
->
progressiveSliceHeight
>
0
)
{
int
height
=
cl
->
screen
->
progressiveSliceHeight
,
y
=
cl
->
progressiveSliceY
;
sraRegionPtr
bbox
=
sraRgnBBox
(
updateRegion
);
sraRect
rect
;
if
(
sraRgnPopRect
(
bbox
,
&
rect
,
0
))
{
sraRegionPtr
slice
;
if
(
y
<
rect
.
y1
||
y
>=
rect
.
y2
)
y
=
rect
.
y1
;
slice
=
sraRgnCreateRect
(
0
,
y
,
cl
->
screen
->
width
,
y
+
height
);
sraRgnAnd
(
updateRegion
,
slice
);
sraRgnDestroy
(
slice
);
}
sraRgnDestroy
(
bbox
);
y
+=
height
;
if
(
y
>=
cl
->
screen
->
height
)
y
=
0
;
cl
->
progressiveSliceY
=
y
;
}
sraRgnOr
(
updateRegion
,
cl
->
copyRegion
);
if
(
!
sraRgnAnd
(
updateRegion
,
cl
->
requestedRegion
)
&&
!
sendCursorShape
&&
!
sendCursorPos
)
{
...
...
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