]> source.dussan.org Git - tigervnc.git/commitdiff
[BugFix] Decoder zlibDecoder was not created in constructor VncCanvas and application...
authorenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Fri, 19 Dec 2008 09:19:59 +0000 (09:19 +0000)
committerenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Fri, 19 Dec 2008 09:19:59 +0000 (09:19 +0000)
[Developement] Decoders updates their params (framebuffer size and bpp) in updateFramebufferSize method.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3436 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tightvnc/vncviewer/VncCanvas.java

index 4cd82af24eaf209724bc4954bfd20f93ad425cbb..51761c09daad0c44d99abd423152646005aa4c96 100644 (file)
@@ -164,6 +164,7 @@ class VncCanvas extends Canvas
     correDecoder = new CoRREDecoder(memGraphics, rfbis);
     hextileDecoder = new HextileDecoder(memGraphics, rfbis);
     tightDecoder = new TightDecoder(memGraphics, rfbis);
+    zlibDecoder = new ZlibDecoder(memGraphics, rfbis);
     zrleDecoder = new ZRLEDecoder(memGraphics, rfbis);
 
     //
@@ -379,6 +380,32 @@ class VncCanvas extends Canvas
       }
     }
 
+    //
+    // Update decoders
+    //
+
+    //
+    // FIXME: Why decoders can be null here?
+    //
+
+    if (decoders != null) {
+      for (int i = 0; i < decoders.length; i++) {
+        //
+        // Set changes to every decoder that we can use
+        //
+
+        decoders[i].setBPP(bytesPixel);
+        decoders[i].setFrameBufferSize(fbWidth, fbHeight);
+        decoders[i].setGraphics(memGraphics);
+
+        //
+        // Update decoder
+        //
+
+        decoders[i].update();
+      }
+    }
+
     // Images with raw pixels should be re-allocated on every change
     // of geometry or pixel format.
     if (bytesPixel == 1) {