diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2017-04-17 06:46:59 -0400 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2017-04-17 06:55:41 -0400 |
commit | 606ca31f38df72908a10d35b1fe4412e6e4851a7 (patch) | |
tree | edaf5cec20ab36b9eafdfd17f238d3489f08fd78 /java/com/tigervnc/vncviewer/Viewport.java | |
parent | c26b4b3bd20b40ca5f1ae9477164473fbd94995d (diff) | |
download | tigervnc-606ca31f38df72908a10d35b1fe4412e6e4851a7.tar.gz tigervnc-606ca31f38df72908a10d35b1fe4412e6e4851a7.zip |
More fixes for java viewer performance regression
Diffstat (limited to 'java/com/tigervnc/vncviewer/Viewport.java')
-rw-r--r-- | java/com/tigervnc/vncviewer/Viewport.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/java/com/tigervnc/vncviewer/Viewport.java b/java/com/tigervnc/vncviewer/Viewport.java index f7448bc8..fd1e6cff 100644 --- a/java/com/tigervnc/vncviewer/Viewport.java +++ b/java/com/tigervnc/vncviewer/Viewport.java @@ -101,8 +101,7 @@ class Viewport extends JPanel implements MouseListener, Rect r = frameBuffer.getDamage(); if (!r.is_empty()) { if (image == null) - image = (BufferedImage)createImage(frameBuffer.width(), frameBuffer.height()); - image.getRaster().setDataElements(r.tl.x, r.tl.y, frameBuffer.getBuffer(r)); + image = (BufferedImage)frameBuffer.getImage(); if (cc.cp.width != scaledWidth || cc.cp.height != scaledHeight) { AffineTransform t = new AffineTransform(); @@ -198,7 +197,7 @@ class Viewport extends JPanel implements MouseListener, frameBuffer = createFramebuffer(frameBuffer.getPF(), w, h); assert(frameBuffer != null); cc.setFramebuffer(frameBuffer); - image = null; + image = (BufferedImage)frameBuffer.getImage(); } setScaledSize(w, h); } |