Example #1
0
 private void updateBufferSize() {
   int pixelSize = (GeckoAppShell.getScreenDepth() == 24) ? 4 : 2;
   int capacity = viewWidth * viewHeight * pixelSize;
   if (buffer == null || buffer.capacity() != capacity) {
     buffer = DirectBufferAllocator.free(buffer);
     buffer = DirectBufferAllocator.allocate(capacity);
   }
 }
Example #2
0
 private Bitmap.Config getBitmapConfig() {
   return (GeckoAppShell.getScreenDepth() == 24) ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565;
 }