Search in sources :

Example 1 with PixelFormat

use of android.graphics.PixelFormat in project chromeview by pwnall.

the class DeviceDisplayInfo method getBitsPerPixel.

/**
 * @return Bits per pixel.
 */
@CalledByNative
public int getBitsPerPixel() {
    int format = getPixelFormat();
    PixelFormat info = new PixelFormat();
    PixelFormat.getPixelFormatInfo(format, info);
    return info.bitsPerPixel;
}
Also used : PixelFormat(android.graphics.PixelFormat) CalledByNative(org.chromium.base.CalledByNative)

Example 2 with PixelFormat

use of android.graphics.PixelFormat in project android_packages_apps_Camera by CyanogenMod.

the class PanoramaModule method getPreviewBufSize.

public int getPreviewBufSize() {
    PixelFormat pixelInfo = new PixelFormat();
    PixelFormat.getPixelFormatInfo(mCameraDevice.getParameters().getPreviewFormat(), pixelInfo);
    // TODO: remove this extra 32 byte after the driver bug is fixed.
    return (mPreviewWidth * mPreviewHeight * pixelInfo.bitsPerPixel / 8) + 32;
}
Also used : PixelFormat(android.graphics.PixelFormat)

Example 3 with PixelFormat

use of android.graphics.PixelFormat in project android_packages_apps_Snap by LineageOS.

the class WideAnglePanoramaModule method getPreviewBufSize.

public int getPreviewBufSize() {
    PixelFormat pixelInfo = new PixelFormat();
    PixelFormat.getPixelFormatInfo(mCameraDevice.getParameters().getPreviewFormat(), pixelInfo);
    // TODO: remove this extra 32 byte after the driver bug is fixed.
    return (mCameraPreviewWidth * mCameraPreviewHeight * pixelInfo.bitsPerPixel / 8) + 32;
}
Also used : PixelFormat(android.graphics.PixelFormat)

Aggregations

PixelFormat (android.graphics.PixelFormat)3 CalledByNative (org.chromium.base.CalledByNative)1