Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5440823f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AHB: add camera usage bits to vndk" am: 9f0e60e6 am: 19d14c56 am:...

Merge "AHB: add camera usage bits to vndk" am: 9f0e60e6 am: 19d14c56 am: 45317f5c am: f04bef4c

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1740715

Change-Id: I7640721d75702cadf6121a65e36a18f5571de3c6
parents 9a2d6625 f04bef4c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -698,6 +698,10 @@ uint64_t AHardwareBuffer_convertToGrallocUsageBits(uint64_t usage) {
            "gralloc and AHardwareBuffer flags don't match");
    static_assert(AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE == (uint64_t)BufferUsage::GPU_MIPMAP_COMPLETE,
            "gralloc and AHardwareBuffer flags don't match");
    static_assert(AHARDWAREBUFFER_USAGE_CAMERA_WRITE == (uint64_t)BufferUsage::CAMERA_OUTPUT,
            "gralloc and AHardwareBuffer flags don't match");
    static_assert(AHARDWAREBUFFER_USAGE_CAMERA_READ == (uint64_t)BufferUsage::CAMERA_INPUT,
            "gralloc and AHardwareBuffer flags don't match");
    return usage;
}

+14 −0
Original line number Diff line number Diff line
@@ -91,6 +91,20 @@ enum {
    AHARDWAREBUFFER_FORMAT_YCbCr_422_I              = 0x14,
};

/**
 * Buffer usage flags.
 */
enum {
    /* for future proofing, keep these in sync with hardware/gralloc.h */

    /* The buffer will be written by the HW camera pipeline. */
    AHARDWAREBUFFER_USAGE_CAMERA_WRITE              = 2UL << 16,
    /* The buffer will be read by the HW camera pipeline. */
    AHARDWAREBUFFER_USAGE_CAMERA_READ               = 4UL << 16,
    /* Mask for the camera access values. */
    AHARDWAREBUFFER_USAGE_CAMERA_MASK               = 6UL << 16,
};

__END_DECLS

#endif /* ANDROID_VNDK_NATIVEWINDOW_AHARDWAREBUFFER_H */