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
c514fd5e
Commit
c514fd5e
authored
Jan 29, 2012
by
Mike Tinglof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't need to copy palette data until we have all data for rect; change a few comments
parent
5ca5e2d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
rfb.js
include/rfb.js
+8
-7
No files found.
include/rfb.js
View file @
c514fd5e
...
@@ -1315,11 +1315,8 @@ encHandlers.TIGHT = function display_tight() {
...
@@ -1315,11 +1315,8 @@ encHandlers.TIGHT = function display_tight() {
var
numColors
=
rQ
[
rQi
+
2
]
+
1
;
var
numColors
=
rQ
[
rQi
+
2
]
+
1
;
var
paletteSize
=
numColors
*
fb_depth
;
var
paletteSize
=
numColors
*
fb_depth
;
FBU
.
bytes
+=
paletteSize
;
FBU
.
bytes
+=
paletteSize
;
if
(
ws
.
rQwait
(
"TIGHT palette "
+
cmode
,
FBU
.
bytes
))
{
return
false
;
}
if
(
ws
.
rQwait
(
"TIGHT palette "
+
cmode
,
FBU
.
bytes
))
{
return
false
;
}
FBU
.
palette
=
ws
.
rQslice
(
3
,
3
+
paletteSize
);
var
bpp
=
(
numColors
<=
2
)
?
1
:
8
;
var
bpp
=
(
numColors
<=
2
)
?
1
:
8
;
var
rowSize
=
Math
.
floor
((
FBU
.
width
*
bpp
+
7
)
/
8
);
var
rowSize
=
Math
.
floor
((
FBU
.
width
*
bpp
+
7
)
/
8
);
var
raw
=
false
;
var
raw
=
false
;
...
@@ -1333,14 +1330,16 @@ encHandlers.TIGHT = function display_tight() {
...
@@ -1333,14 +1330,16 @@ encHandlers.TIGHT = function display_tight() {
if
(
ws
.
rQwait
(
"TIGHT "
+
cmode
,
FBU
.
bytes
))
{
return
false
;
}
if
(
ws
.
rQwait
(
"TIGHT "
+
cmode
,
FBU
.
bytes
))
{
return
false
;
}
// Shift ctl, filter id, num colors, palette entries, and clength off
// Shift ctl, filter id, num colors, palette entries, and clength off
ws
.
rQshiftBytes
(
3
+
paletteSize
+
clength
[
0
]);
ws
.
rQshiftBytes
(
3
);
FBU
.
palette
=
ws
.
rQshiftBytes
(
paletteSize
);
ws
.
rQshiftBytes
(
clength
[
0
]);
// Decompress data
if
(
raw
)
if
(
raw
)
data
=
ws
.
rQshiftBytes
(
clength
[
1
]);
data
=
ws
.
rQshiftBytes
(
clength
[
1
]);
else
else
data
=
decompress
(
ws
.
rQshiftBytes
(
clength
[
1
]));
data
=
decompress
(
ws
.
rQshiftBytes
(
clength
[
1
]));
// Convert indexed (palette based) image data to RGB
var
dest
=
[];
var
dest
=
[];
var
x
,
y
,
b
;
var
x
,
y
,
b
;
if
(
numColors
==
2
)
{
if
(
numColors
==
2
)
{
...
@@ -1395,10 +1394,12 @@ encHandlers.TIGHT = function display_tight() {
...
@@ -1395,10 +1394,12 @@ encHandlers.TIGHT = function display_tight() {
}
}
else
else
clength
=
getCLength
(
ws
.
rQslice
(
1
,
4
));
clength
=
getCLength
(
ws
.
rQslice
(
1
,
4
));
FBU
.
bytes
=
1
+
clength
[
0
]
+
clength
[
1
];
// ctl + clength size + zlib-data
FBU
.
bytes
=
1
+
clength
[
0
]
+
clength
[
1
];
if
(
ws
.
rQwait
(
"TIGHT "
+
cmode
,
FBU
.
bytes
))
{
return
false
;
}
if
(
ws
.
rQwait
(
"TIGHT "
+
cmode
,
FBU
.
bytes
))
{
return
false
;
}
ws
.
rQshiftBytes
(
1
+
clength
[
0
]);
// ctl + clength
// Shift ctl, clength off
ws
.
rQshiftBytes
(
1
+
clength
[
0
]);
if
(
raw
)
if
(
raw
)
data
=
ws
.
rQshiftBytes
(
clength
[
1
]);
data
=
ws
.
rQshiftBytes
(
clength
[
1
]);
else
else
...
...
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