changeset 6670:774a20d5f1f5

Fix for RT-36601 [Monocle] Framebuffer allocates incorrectly sized clear buffer. Reviewed by dblaukopf. Tested with HelloSanity.
author Lisa.Selle@oracle.com
date Wed, 09 Apr 2014 14:43:05 -0400
parents 5e36944bb38c
children 1526ac7b07a0
files modules/graphics/src/main/java/com/sun/glass/ui/monocle/Framebuffer.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/monocle/Framebuffer.java	Wed Apr 09 11:40:50 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/monocle/Framebuffer.java	Wed Apr 09 14:43:05 2014 -0400
@@ -51,7 +51,7 @@
         this.height = height;
         this.byteDepth = depth >>> 3;
         if (clear) {
-            clearBuffer = ByteBuffer.allocate(width * 4);
+            clearBuffer = ByteBuffer.allocate(width * byteDepth);
         }
     }