diff options
author | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-19 05:34:17 +0000 |
---|---|---|
committer | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-19 05:34:17 +0000 |
commit | 2c23ba19f24146a2b04ee4d76affb6050dd19db4 (patch) | |
tree | e6fdf25dd75d0b7ecc231e7301d939eb96b2507d /java/src/com/tightvnc | |
parent | 292cf9de50a6342421cd94cfbcdc756b9e653def (diff) | |
download | tigervnc-2c23ba19f24146a2b04ee4d76affb6050dd19db4.tar.gz tigervnc-2c23ba19f24146a2b04ee4d76affb6050dd19db4.zip |
[Documentation] Added comments to methods.
[Cleanup] Added newlines after comments.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3416 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/src/com/tightvnc')
-rw-r--r-- | java/src/com/tightvnc/decoder/RawDecoder.java | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/java/src/com/tightvnc/decoder/RawDecoder.java b/java/src/com/tightvnc/decoder/RawDecoder.java index efa69d13..c6782602 100644 --- a/java/src/com/tightvnc/decoder/RawDecoder.java +++ b/java/src/com/tightvnc/decoder/RawDecoder.java @@ -35,6 +35,10 @@ public class RawDecoder { cm24 = new DirectColorModel(24, 0xFF0000, 0x00FF00, 0x0000FF); } + // + // Set methods to set value of non-static protected members of class + // + public void setRfbInputStream(RfbInputStream is) { rfbis = is; } @@ -47,6 +51,11 @@ public class RawDecoder { bytesPerPixel = bpp; } + public void setFrameBufferSize(int w, int h) { + framebufferWidth = w; + framebufferHeight = h; + } + public void setSessionRecorder(RecordInterface ri) { rec = ri; } @@ -59,11 +68,6 @@ public class RawDecoder { return bytesPerPixel; } - public void setFrameBufferSize(int w, int h) { - framebufferWidth = w; - framebufferHeight = h; - } - // // Decodes Raw Pixels data and draw it into graphics // @@ -74,6 +78,9 @@ public class RawDecoder { if (pixels8 != null) { rfbis.readFully(pixels8, dy * framebufferWidth + x, w); } + // + // Save decoded data to RecordInterface + // if (rec.canWrite()) { rec.write(pixels8, dy * framebufferWidth + x, w); } @@ -106,6 +113,7 @@ public class RawDecoder { // // Display newly updated area of pixels. // + protected void handleUpdatedPixels(int x, int y, int w, int h) { // Draw updated pixels of the off-screen image. pixelsSource.newPixels(x, y, w, h); @@ -171,6 +179,7 @@ public class RawDecoder { // // Unique data for every decoder (? maybe not ?) // + protected int bytesPerPixel = 4; protected int framebufferWidth = 0; protected int framebufferHeight = 0; @@ -181,6 +190,7 @@ public class RawDecoder { // // This data must be shared between decoders // + protected static byte []pixels8 = null; protected static int []pixels24 = null; protected static MemoryImageSource pixelsSource = null; @@ -189,6 +199,7 @@ public class RawDecoder { // // Access to this static members only though protected methods // + private static ColorModel cm8 = null; private static ColorModel cm24 = null; private static Color []color256 = null; |