Loading camera/common/default/Android.bp +3 −2 Original line number Diff line number Diff line Loading @@ -30,12 +30,13 @@ cc_library_static { "libgralloctypes", "libhardware", "libcamera_metadata", "android.hardware.graphics.mapper@2.0", "android.hardware.graphics.mapper@3.0", "android.hardware.graphics.mapper@4.0", "libexif", "libui", ], include_dirs: ["system/media/private/camera/include"], export_include_dirs: ["include"], export_shared_lib_headers: ["libui"], } // NOTE: Deprecated module kept for compatibility reasons. Loading camera/common/default/HandleImporter.cpp +334 −65 File changed.Preview size limit exceeded, changes collapsed. Show changes camera/common/default/include/HandleImporter.h +19 −7 Original line number Diff line number Diff line Loading @@ -17,11 +17,15 @@ #ifndef CAMERA_COMMON_1_0_HANDLEIMPORTED_H #define CAMERA_COMMON_1_0_HANDLEIMPORTED_H #include <android/hardware/graphics/mapper/2.0/IMapper.h> #include <android/hardware/graphics/mapper/3.0/IMapper.h> #include <android/hardware/graphics/mapper/4.0/IMapper.h> #include <cutils/native_handle.h> #include <system/graphics.h> #include <ui/Rect.h> #include <utils/Mutex.h> using android::hardware::graphics::mapper::V2_0::IMapper; using android::hardware::graphics::mapper::V2_0::YCbCrLayout; namespace android { namespace hardware { namespace camera { Loading @@ -45,11 +49,11 @@ class HandleImporter { void* lock(buffer_handle_t& buf, uint64_t cpuUsage, size_t size); // Locks 2-D buffer. Assumes caller has waited for acquire fences. void* lock(buffer_handle_t& buf, uint64_t cpuUsage, const android::Rect& accessRegion); void* lock(buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion); // Assumes caller has waited for acquire fences. android_ycbcr lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage, const android::Rect& accessRegion); YCbCrLayout lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion); // Query the stride of the first plane in bytes. status_t getMonoPlanarStrideBytes(buffer_handle_t& buf, uint32_t* stride /*out*/); Loading @@ -65,11 +69,19 @@ class HandleImporter { void initializeLocked(); void cleanup(); bool importBufferInternal(buffer_handle_t& handle); int unlockInternal(buffer_handle_t& buf); template <class M, class E> bool importBufferInternal(const sp<M> mapper, buffer_handle_t& handle); template <class M, class E> YCbCrLayout lockYCbCrInternal(const sp<M> mapper, buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion); template <class M, class E> int unlockInternal(const sp<M> mapper, buffer_handle_t& buf); Mutex mLock; bool mInitialized; sp<IMapper> mMapperV2; sp<graphics::mapper::V3_0::IMapper> mMapperV3; sp<graphics::mapper::V4_0::IMapper> mMapperV4; }; } // namespace helper Loading camera/device/1.0/default/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ cc_library_shared { "libgralloctypes", "libhardware", "libcamera_metadata", "libui", ], static_libs: [ "android.hardware.camera.common@1.0-helper", Loading camera/device/3.2/default/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ cc_library_shared { "libhardware", "libcamera_metadata", "libfmq", "libui", ], static_libs: [ "android.hardware.camera.common@1.0-helper", Loading Loading
camera/common/default/Android.bp +3 −2 Original line number Diff line number Diff line Loading @@ -30,12 +30,13 @@ cc_library_static { "libgralloctypes", "libhardware", "libcamera_metadata", "android.hardware.graphics.mapper@2.0", "android.hardware.graphics.mapper@3.0", "android.hardware.graphics.mapper@4.0", "libexif", "libui", ], include_dirs: ["system/media/private/camera/include"], export_include_dirs: ["include"], export_shared_lib_headers: ["libui"], } // NOTE: Deprecated module kept for compatibility reasons. Loading
camera/common/default/HandleImporter.cpp +334 −65 File changed.Preview size limit exceeded, changes collapsed. Show changes
camera/common/default/include/HandleImporter.h +19 −7 Original line number Diff line number Diff line Loading @@ -17,11 +17,15 @@ #ifndef CAMERA_COMMON_1_0_HANDLEIMPORTED_H #define CAMERA_COMMON_1_0_HANDLEIMPORTED_H #include <android/hardware/graphics/mapper/2.0/IMapper.h> #include <android/hardware/graphics/mapper/3.0/IMapper.h> #include <android/hardware/graphics/mapper/4.0/IMapper.h> #include <cutils/native_handle.h> #include <system/graphics.h> #include <ui/Rect.h> #include <utils/Mutex.h> using android::hardware::graphics::mapper::V2_0::IMapper; using android::hardware::graphics::mapper::V2_0::YCbCrLayout; namespace android { namespace hardware { namespace camera { Loading @@ -45,11 +49,11 @@ class HandleImporter { void* lock(buffer_handle_t& buf, uint64_t cpuUsage, size_t size); // Locks 2-D buffer. Assumes caller has waited for acquire fences. void* lock(buffer_handle_t& buf, uint64_t cpuUsage, const android::Rect& accessRegion); void* lock(buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion); // Assumes caller has waited for acquire fences. android_ycbcr lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage, const android::Rect& accessRegion); YCbCrLayout lockYCbCr(buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion); // Query the stride of the first plane in bytes. status_t getMonoPlanarStrideBytes(buffer_handle_t& buf, uint32_t* stride /*out*/); Loading @@ -65,11 +69,19 @@ class HandleImporter { void initializeLocked(); void cleanup(); bool importBufferInternal(buffer_handle_t& handle); int unlockInternal(buffer_handle_t& buf); template <class M, class E> bool importBufferInternal(const sp<M> mapper, buffer_handle_t& handle); template <class M, class E> YCbCrLayout lockYCbCrInternal(const sp<M> mapper, buffer_handle_t& buf, uint64_t cpuUsage, const IMapper::Rect& accessRegion); template <class M, class E> int unlockInternal(const sp<M> mapper, buffer_handle_t& buf); Mutex mLock; bool mInitialized; sp<IMapper> mMapperV2; sp<graphics::mapper::V3_0::IMapper> mMapperV3; sp<graphics::mapper::V4_0::IMapper> mMapperV4; }; } // namespace helper Loading
camera/device/1.0/default/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ cc_library_shared { "libgralloctypes", "libhardware", "libcamera_metadata", "libui", ], static_libs: [ "android.hardware.camera.common@1.0-helper", Loading
camera/device/3.2/default/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ cc_library_shared { "libhardware", "libcamera_metadata", "libfmq", "libui", ], static_libs: [ "android.hardware.camera.common@1.0-helper", Loading