[BugFix] Tight encoding statistics enabled.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3456 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/src/com/tightvnc/decoder/TightDecoder.java b/java/src/com/tightvnc/decoder/TightDecoder.java
index a1d28d7..33ba7db 100644
--- a/java/src/com/tightvnc/decoder/TightDecoder.java
+++ b/java/src/com/tightvnc/decoder/TightDecoder.java
@@ -66,6 +66,18 @@
}
//
+ // 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 @@
jpegRect = null;
return;
+ } else {
+ statNumRectsTight++;
}
// Read filter id and parameters.
@@ -476,4 +490,6 @@
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 4cd2e93..32d709a 100644
--- a/java/src/com/tightvnc/vncviewer/VncCanvas.java
+++ b/java/src/com/tightvnc/vncviewer/VncCanvas.java
@@ -523,7 +523,9 @@
case RfbProto.EncodingTight:
if (tightDecoder != null) {
statNumRectsTightJPEG = tightDecoder.getNumJPEGRects();
+ //statNumRectsTight = tightDecoder.getNumTightRects();
}
+ statNumRectsTight++;
handleTightRect(rx, ry, rw, rh);
break;
default:
@@ -858,8 +860,10 @@
statNumRectsCopy = 0;
statNumBytesEncoded = 0;
statNumBytesDecoded = 0;
- if (tightDecoder != null)
+ if (tightDecoder != null) {
tightDecoder.setNumJPEGRects(0);
+ tightDecoder.setNumTightRects(0);
+ }
}
//////////////////////////////////////////////////////////////////