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); } }
private Bitmap.Config getBitmapConfig() { return (GeckoAppShell.getScreenDepth() == 24) ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565; }