summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-25 08:10:43 +0000
committerenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-25 08:10:43 +0000
commit5805ba676cfdcd86d82698035489a7df289a3761 (patch)
tree6830456ab91ba7d781cc552f0713e332cc0be730 /java/src
parent32b421b0127ef100d44f9085b2cb17ee694bff1d (diff)
downloadtigervnc-5805ba676cfdcd86d82698035489a7df289a3761.tar.gz
tigervnc-5805ba676cfdcd86d82698035489a7df289a3761.zip
[Refactoring] Using CopyRect decoder to handle copyrect encoded data.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3464 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/tightvnc/vncviewer/VncCanvas.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/tightvnc/vncviewer/VncCanvas.java b/java/src/com/tightvnc/vncviewer/VncCanvas.java
index 09541126..051928ab 100644
--- a/java/src/com/tightvnc/vncviewer/VncCanvas.java
+++ b/java/src/com/tightvnc/vncviewer/VncCanvas.java
@@ -24,6 +24,7 @@
package com.tightvnc.vncviewer;
import com.tightvnc.decoder.CoRREDecoder;
+import com.tightvnc.decoder.CopyRectDecoder;
import com.tightvnc.decoder.HextileDecoder;
import com.tightvnc.decoder.RREDecoder;
import com.tightvnc.decoder.RawDecoder;
@@ -70,6 +71,7 @@ class VncCanvas extends Canvas
HextileDecoder hextileDecoder;
ZRLEDecoder zrleDecoder;
TightDecoder tightDecoder;
+ CopyRectDecoder copyRectDecoder;
// Base decoder decoders array
RawDecoder []decoders = null;
@@ -127,6 +129,7 @@ class VncCanvas extends Canvas
tightDecoder = new TightDecoder(memGraphics, rfbis);
zlibDecoder = new ZlibDecoder(memGraphics, rfbis);
zrleDecoder = new ZRLEDecoder(memGraphics, rfbis);
+ copyRectDecoder = new CopyRectDecoder(memGraphics, rfbis);
//
// Set data for decoders that needs extra parameters
@@ -139,7 +142,7 @@ class VncCanvas extends Canvas
// Create array that contains our decoders
//
- decoders = new RawDecoder[7];
+ decoders = new RawDecoder[8];
decoders[0] = rawDecoder;
decoders[1] = rreDecoder;
decoders[2] = correDecoder;
@@ -147,6 +150,7 @@ class VncCanvas extends Canvas
decoders[4] = zlibDecoder;
decoders[5] = tightDecoder;
decoders[6] = zrleDecoder;
+ decoders[7] = copyRectDecoder;
//
// Set session recorder for decoders
@@ -662,10 +666,7 @@ class VncCanvas extends Canvas
//
void handleCopyRect(int x, int y, int w, int h) throws IOException {
- rfb.readCopyRect();
- memGraphics.copyArea(rfb.copyRectSrcX, rfb.copyRectSrcY, w, h,
- x - rfb.copyRectSrcX, y - rfb.copyRectSrcY);
-
+ copyRectDecoder.handleRect(x, y, w, h);
scheduleRepaint(x, y, w, h);
}