Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
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
noVNC
Commits
d67de767
Commit
d67de767
authored
Aug 31, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename tightpng img queue variable to imgQ.
parent
3e7a7cef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
rfb.js
include/rfb.js
+22
-22
No files found.
include/rfb.js
View file @
d67de767
...
...
@@ -23,7 +23,7 @@ var that = {}, // Public API interface
pixelFormat
,
clientEncodings
,
fbUpdateRequest
,
keyEvent
,
pointerEvent
,
clientCutText
,
extract_data_uri
,
scan_tight_img
s
,
extract_data_uri
,
scan_tight_img
Q
,
send_array
,
checkEvents
,
// Overridable for testing
...
...
@@ -70,6 +70,7 @@ var that = {}, // Public API interface
// Receive and send queues
rQ
=
[],
// Receive Queue
rQi
=
0
,
// Receive Queue Index
rQmax
=
100000
,
// Max size before compacting
sQ
=
""
,
// Send Queue
// Frame buffer update state
...
...
@@ -86,7 +87,7 @@ var that = {}, // Public API interface
encoding
:
0
,
subencoding
:
-
1
,
background
:
null
,
img
s
:
[]
// TIGHT_PNG image queue
img
Q
:
[]
// TIGHT_PNG image queue
},
fb_Bpp
=
4
,
...
...
@@ -98,10 +99,9 @@ var that = {}, // Public API interface
cuttext
=
'none'
,
// ServerCutText wait state
cuttext_length
=
0
,
scan_img
s
_rate
=
100
,
scan_img
Q
_rate
=
100
,
last_req_time
=
0
,
rre_chunk_sz
=
100
,
rQmaxlen
=
100000
,
timing
=
{
last_fbu
:
0
,
...
...
@@ -309,7 +309,7 @@ init_vars = function() {
FBU
.
subrects
=
0
;
// RRE and HEXTILE
FBU
.
lines
=
0
;
// RAW
FBU
.
tiles
=
0
;
// HEXTILE
FBU
.
img
s
=
[];
// TIGHT_PNG image queue
FBU
.
img
Q
=
[];
// TIGHT_PNG image queue
mouse_buttonMask
=
0
;
mouse_arr
=
[];
};
...
...
@@ -490,7 +490,7 @@ function handle_message() {
}
}
// Compact the queue
if
(
rQ
.
length
>
rQmax
len
)
{
if
(
rQ
.
length
>
rQmax
)
{
//Util.Debug("Compacting receive queue");
rQ
=
rQ
.
slice
(
rQi
);
rQi
=
0
;
...
...
@@ -828,7 +828,7 @@ init_msg = function() {
/* Start pushing/polling */
setTimeout
(
checkEvents
,
conf
.
check_rate
);
setTimeout
(
scan_tight_img
s
,
scan_imgs
_rate
);
setTimeout
(
scan_tight_img
Q
,
scan_imgQ
_rate
);
if
(
conf
.
encrypt
)
{
updateState
(
'normal'
,
"Connected (encrypted) to: "
+
fb_name
);
...
...
@@ -1323,8 +1323,8 @@ encHandlers.TIGHT_PNG = function display_tight_png() {
//Util.Debug(" png, rQlen(): " + rQlen() + ", clength[0]: " + clength[0] + ", clength[1]: " + clength[1]);
rQshiftBytes
(
1
+
clength
[
0
]);
// shift off ctl + compact length
img
=
new
Image
();
img
.
onload
=
scan_tight_img
s
;
FBU
.
img
s
.
push
([
img
,
FBU
.
x
,
FBU
.
y
]);
img
.
onload
=
scan_tight_img
Q
;
FBU
.
img
Q
.
push
([
img
,
FBU
.
x
,
FBU
.
y
]);
img
.
src
=
"data:image/"
+
cmode
+
extract_data_uri
(
rQshiftBytes
(
clength
[
1
]));
img
=
null
;
...
...
@@ -1346,16 +1346,16 @@ extract_data_uri = function(arr) {
return
";base64,"
+
Base64
.
encode
(
arr
);
};
scan_tight_img
s
=
function
()
{
var
img
,
img
s
,
ctx
;
scan_tight_img
Q
=
function
()
{
var
img
,
img
Q
,
ctx
;
ctx
=
canvas
.
getContext
();
if
(
rfb_state
===
'normal'
)
{
img
s
=
FBU
.
imgs
;
while
((
img
s
.
length
>
0
)
&&
(
imgs
[
0
][
0
].
complete
))
{
img
=
img
s
.
shift
();
img
Q
=
FBU
.
imgQ
;
while
((
img
Q
.
length
>
0
)
&&
(
imgQ
[
0
][
0
].
complete
))
{
img
=
img
Q
.
shift
();
ctx
.
drawImage
(
img
[
0
],
img
[
1
],
img
[
2
]);
}
setTimeout
(
scan_tight_img
s
,
scan_imgs
_rate
);
setTimeout
(
scan_tight_img
Q
,
scan_imgQ
_rate
);
}
};
...
...
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