[Refactoring, cleanup] Write encoding ID of real decoders in decoders classes. Pseudo encoding ID still writes in RfbProto class. ZlibDecoder recoding enabled. ZRLEDecoder recoding still not working.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3455 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/src/com/tightvnc/decoder/HextileDecoder.java b/java/src/com/tightvnc/decoder/HextileDecoder.java
index 9c05309..da7e778 100644
--- a/java/src/com/tightvnc/decoder/HextileDecoder.java
+++ b/java/src/com/tightvnc/decoder/HextileDecoder.java
@@ -46,6 +46,15 @@
public void handleRect(int x, int y, int w, int h) throws IOException,
Exception {
+
+ //
+ // Write encoding ID to record output stream
+ //
+
+ if (dos != null) {
+ dos.writeInt(HextileDecoder.EncodingHextile);
+ }
+
hextile_bg = new Color(0);
hextile_fg = new Color(0);
@@ -87,9 +96,16 @@
// Is it a raw-encoded sub-rectangle?
if ((subencoding & HextileRaw) != 0) {
- //handleRawRect(tx, ty, tw, th, false);
+ //
+ // Disable encoding id writting to record stream
+ // in super (RawDecoder) class, cause we write subencoding ID
+ // in this class (see code above).
+ //
+
+ super.enableEncodingRecordWritting(false);
super.handleRect(tx, ty, tw, th);
super.handleUpdatedPixels(tx, ty, tw, th);
+ super.enableEncodingRecordWritting(true);
return;
}