diff options
author | Brian Hinz <bphinz@users.sourceforge.net> | 2013-03-01 00:29:10 +0000 |
---|---|---|
committer | Brian Hinz <bphinz@users.sourceforge.net> | 2013-03-01 00:29:10 +0000 |
commit | 299df6865f2f05a9f6feef9b4ac758e85672949f (patch) | |
tree | 77b2f8bfb5dfb2e337a92bc8617cfd6e4fb4d00b /java/com/tigervnc/rfb/PixelBuffer.java | |
parent | 3e7ed8164f77dfdfe62d8bedd35e48d3a8ae575a (diff) | |
download | tigervnc-299df6865f2f05a9f6feef9b4ac758e85672949f.tar.gz tigervnc-299df6865f2f05a9f6feef9b4ac758e85672949f.zip |
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
Diffstat (limited to 'java/com/tigervnc/rfb/PixelBuffer.java')
-rw-r--r-- | java/com/tigervnc/rfb/PixelBuffer.java | 6 |
1 files changed, 3 insertions, 3 deletions
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+")"); |