diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/tightvnc/decoder/TightDecoder.java | 16 | ||||
-rw-r--r-- | java/src/com/tightvnc/vncviewer/VncCanvas.java | 6 |
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); + } } ////////////////////////////////////////////////////////////////// |