From 299df6865f2f05a9f6feef9b4ac758e85672949f Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Fri, 1 Mar 2013 00:29:10 +0000 Subject: Using DirectColorModel constructor with an alpha mask other than 0 creates a ColorMap with Transparency.TRANSLUCENT rather than OPAQUE. This in turn causes rendering between opaque BufferedImages or to the screen to be performed without HW acceleration. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5052 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/rfb/PixelBuffer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'java') diff --git a/java/com/tigervnc/rfb/PixelBuffer.java b/java/com/tigervnc/rfb/PixelBuffer.java index d7380b78..29d607ec 100644 --- a/java/com/tigervnc/rfb/PixelBuffer.java +++ b/java/com/tigervnc/rfb/PixelBuffer.java @@ -52,14 +52,14 @@ public class PixelBuffer { cm = new DirectColorModel(8, rmask, gmask, bmask); break; case 16: - cm = new DirectColorModel(32, 0xF800, 0x07C0, 0x003E, (0xff << 24)); + cm = new DirectColorModel(32, 0xF800, 0x07C0, 0x003E); break; case 24: - cm = new DirectColorModel(32, (0xff << 16), (0xff << 8), 0xff, (0xff << 24)); + cm = new DirectColorModel(32, (0xff << 16), (0xff << 8), 0xff); break; case 32: cm = new DirectColorModel(32, (0xff << pf.redShift), - (0xff << pf.greenShift), (0xff << pf.blueShift), (0xff << 24)); + (0xff << pf.greenShift), (0xff << pf.blueShift)); break; default: throw new Exception("Unsupported color depth ("+pf.depth+")"); -- cgit v1.2.3