aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-24 09:01:19 +0000
committerenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-24 09:01:19 +0000
commit1214ab114395fe16d9c86fe273d51ad8f36751d6 (patch)
treeb8695dc379f800a777994473ec1c9ab10a345b4a /java
parent2f0294e004bc31cc9329e3e701d33de408a177bf (diff)
downloadtigervnc-1214ab114395fe16d9c86fe273d51ad8f36751d6.tar.gz
tigervnc-1214ab114395fe16d9c86fe273d51ad8f36751d6.zip
[BugFix] Tight encoding statistics enabled.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3456 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java')
-rw-r--r--java/src/com/tightvnc/decoder/TightDecoder.java16
-rw-r--r--java/src/com/tightvnc/vncviewer/VncCanvas.java6
2 files changed, 21 insertions, 1 deletions
diff --git a/java/src/com/tightvnc/decoder/TightDecoder.java b/java/src/com/tightvnc/decoder/TightDecoder.java
index a1d28d70..33ba7dbb 100644
--- a/java/src/com/tightvnc/decoder/TightDecoder.java
+++ b/java/src/com/tightvnc/decoder/TightDecoder.java
@@ -66,6 +66,18 @@ public class TightDecoder extends RawDecoder implements ImageObserver {
}
//
+ // Tight processing statistic methods
+ //
+
+ public int getNumTightRects() {
+ return statNumRectsTight;
+ }
+
+ public void setNumTightRects(int v) {
+ statNumRectsTight = v;
+ }
+
+ //
// Handle a Tight-encoded rectangle.
//
@@ -166,6 +178,8 @@ public class TightDecoder extends RawDecoder implements ImageObserver {
jpegRect = null;
return;
+ } else {
+ statNumRectsTight++;
}
// Read filter id and parameters.
@@ -476,4 +490,6 @@ public class TightDecoder extends RawDecoder implements ImageObserver {
private Repaintable repainatableControl = null;
// Jpeg decoding statistics
private int statNumRectsTightJPEG = 0;
+ // Tight decoding statistics
+ private int statNumRectsTight = 0;
}
diff --git a/java/src/com/tightvnc/vncviewer/VncCanvas.java b/java/src/com/tightvnc/vncviewer/VncCanvas.java
index 4cd2e935..32d709a1 100644
--- a/java/src/com/tightvnc/vncviewer/VncCanvas.java
+++ b/java/src/com/tightvnc/vncviewer/VncCanvas.java
@@ -523,7 +523,9 @@ class VncCanvas extends Canvas
case RfbProto.EncodingTight:
if (tightDecoder != null) {
statNumRectsTightJPEG = tightDecoder.getNumJPEGRects();
+ //statNumRectsTight = tightDecoder.getNumTightRects();
}
+ statNumRectsTight++;
handleTightRect(rx, ry, rw, rh);
break;
default:
@@ -858,8 +860,10 @@ class VncCanvas extends Canvas
statNumRectsCopy = 0;
statNumBytesEncoded = 0;
statNumBytesDecoded = 0;
- if (tightDecoder != null)
+ if (tightDecoder != null) {
tightDecoder.setNumJPEGRects(0);
+ tightDecoder.setNumTightRects(0);
+ }
}
//////////////////////////////////////////////////////////////////