Loading automotive/evs/1.0/default/EvsCamera.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -311,9 +311,7 @@ unsigned EvsCamera::increaseAvailableFrames_Locked(unsigned numToAdd) { while (added < numToAdd) { buffer_handle_t memHandle = nullptr; status_t result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, mUsage, status_t result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, &memHandle, &mStride, 0, "EvsCamera"); if (result != NO_ERROR) { ALOGE("Error %d allocating %d x %d graphics buffer", result, mWidth, mHeight); Loading automotive/evs/1.0/default/EvsDisplay.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -166,11 +166,9 @@ Return<void> EvsDisplay::getTargetBuffer(getTargetBuffer_cb _hidl_cb) { // Allocate the buffer that will hold our displayable image buffer_handle_t handle = nullptr; GraphicBufferAllocator& alloc(GraphicBufferAllocator::get()); status_t result = alloc.allocate(mBuffer.width, mBuffer.height, mBuffer.format, 1, mBuffer.usage, mBuffer.usage, &handle, &mBuffer.stride, 0, "EvsDisplay"); status_t result = alloc.allocate( mBuffer.width, mBuffer.height, mBuffer.format, 1, mBuffer.usage, &handle, &mBuffer.stride, 0, "EvsDisplay"); if (result != NO_ERROR) { ALOGE("Error %d allocating %d x %d graphics buffer", result, mBuffer.width, mBuffer.height); Loading camera/provider/2.4/vts/functional/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ cc_test { "libgui", "libui" ], static_libs: ["VtsHalHidlTargetTestBase"], static_libs: ["VtsHalHidlTargetTestBase", "libgrallocusage"], cflags: [ "-O0", "-g", Loading camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +33 −29 Original line number Diff line number Diff line Loading @@ -15,28 +15,29 @@ */ #define LOG_TAG "camera_hidl_hal_test" #include <android/hardware/camera/provider/2.4/ICameraProvider.h> #include <android/hardware/camera/device/3.2/ICameraDevice.h> #include <VtsHalHidlTargetTestBase.h> #include <android/hardware/camera/device/1.0/ICameraDevice.h> #include "CameraParameters.h" #include <system/camera.h> #include <android/hardware/camera/device/3.2/ICameraDevice.h> #include <android/hardware/camera/provider/2.4/ICameraProvider.h> #include <android/log.h> #include <ui/GraphicBuffer.h> #include <VtsHalHidlTargetTestBase.h> #include <binder/MemoryHeapBase.h> #include <grallocusage/GrallocUsageConversion.h> #include <gui/BufferItemConsumer.h> #include <gui/BufferQueue.h> #include <gui/Surface.h> #include <gui/BufferItemConsumer.h> #include <binder/MemoryHeapBase.h> #include <regex> #include "system/camera_metadata.h" #include <hardware/gralloc.h> #include <hardware/gralloc1.h> #include <unordered_map> #include <mutex> #include <condition_variable> #include <chrono> #include <inttypes.h> #include <system/camera.h> #include <ui/GraphicBuffer.h> #include <utils/Errors.h> #include <chrono> #include <condition_variable> #include <mutex> #include <regex> #include <unordered_map> #include "CameraParameters.h" #include "system/camera_metadata.h" using ::android::hardware::Return; using ::android::hardware::Void; Loading Loading @@ -2480,11 +2481,12 @@ TEST_F(CameraHidlTest, processCaptureRequestPreview) { settings = req; }); ASSERT_TRUE(ret.isOk()); sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width, previewStream.height, sp<GraphicBuffer> gb = new GraphicBuffer( previewStream.width, previewStream.height, static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat), 1, halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage); 1, android_convertGralloc1To0Usage( halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage)); ASSERT_NE(nullptr, gb.get()); StreamBuffer outputBuffer = {halStreamConfig.streams[0].id, bufferId, hidl_handle(gb->getNativeBuffer()->handle), Loading Loading @@ -2586,11 +2588,12 @@ TEST_F(CameraHidlTest, processCaptureRequestInvalidSinglePreview) { &session /*out*/, &previewStream /*out*/, &halStreamConfig /*out*/); sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width, previewStream.height, sp<GraphicBuffer> gb = new GraphicBuffer( previewStream.width, previewStream.height, static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat), 1, halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage); 1, android_convertGralloc1To0Usage( halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage)); StreamBuffer outputBuffer = {halStreamConfig.streams[0].id, bufferId, hidl_handle(gb->getNativeBuffer()->handle), Loading Loading @@ -2706,11 +2709,12 @@ TEST_F(CameraHidlTest, flushPreviewRequest) { settings = req; }); ASSERT_TRUE(ret.isOk()); sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width, previewStream.height, sp<GraphicBuffer> gb = new GraphicBuffer( previewStream.width, previewStream.height, static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat), 1, halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage); 1, android_convertGralloc1To0Usage( halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage)); ASSERT_NE(nullptr, gb.get()); StreamBuffer outputBuffer = {halStreamConfig.streams[0].id, bufferId, hidl_handle(gb->getNativeBuffer()->handle), Loading Loading
automotive/evs/1.0/default/EvsCamera.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -311,9 +311,7 @@ unsigned EvsCamera::increaseAvailableFrames_Locked(unsigned numToAdd) { while (added < numToAdd) { buffer_handle_t memHandle = nullptr; status_t result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, mUsage, status_t result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, &memHandle, &mStride, 0, "EvsCamera"); if (result != NO_ERROR) { ALOGE("Error %d allocating %d x %d graphics buffer", result, mWidth, mHeight); Loading
automotive/evs/1.0/default/EvsDisplay.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -166,11 +166,9 @@ Return<void> EvsDisplay::getTargetBuffer(getTargetBuffer_cb _hidl_cb) { // Allocate the buffer that will hold our displayable image buffer_handle_t handle = nullptr; GraphicBufferAllocator& alloc(GraphicBufferAllocator::get()); status_t result = alloc.allocate(mBuffer.width, mBuffer.height, mBuffer.format, 1, mBuffer.usage, mBuffer.usage, &handle, &mBuffer.stride, 0, "EvsDisplay"); status_t result = alloc.allocate( mBuffer.width, mBuffer.height, mBuffer.format, 1, mBuffer.usage, &handle, &mBuffer.stride, 0, "EvsDisplay"); if (result != NO_ERROR) { ALOGE("Error %d allocating %d x %d graphics buffer", result, mBuffer.width, mBuffer.height); Loading
camera/provider/2.4/vts/functional/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ cc_test { "libgui", "libui" ], static_libs: ["VtsHalHidlTargetTestBase"], static_libs: ["VtsHalHidlTargetTestBase", "libgrallocusage"], cflags: [ "-O0", "-g", Loading
camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +33 −29 Original line number Diff line number Diff line Loading @@ -15,28 +15,29 @@ */ #define LOG_TAG "camera_hidl_hal_test" #include <android/hardware/camera/provider/2.4/ICameraProvider.h> #include <android/hardware/camera/device/3.2/ICameraDevice.h> #include <VtsHalHidlTargetTestBase.h> #include <android/hardware/camera/device/1.0/ICameraDevice.h> #include "CameraParameters.h" #include <system/camera.h> #include <android/hardware/camera/device/3.2/ICameraDevice.h> #include <android/hardware/camera/provider/2.4/ICameraProvider.h> #include <android/log.h> #include <ui/GraphicBuffer.h> #include <VtsHalHidlTargetTestBase.h> #include <binder/MemoryHeapBase.h> #include <grallocusage/GrallocUsageConversion.h> #include <gui/BufferItemConsumer.h> #include <gui/BufferQueue.h> #include <gui/Surface.h> #include <gui/BufferItemConsumer.h> #include <binder/MemoryHeapBase.h> #include <regex> #include "system/camera_metadata.h" #include <hardware/gralloc.h> #include <hardware/gralloc1.h> #include <unordered_map> #include <mutex> #include <condition_variable> #include <chrono> #include <inttypes.h> #include <system/camera.h> #include <ui/GraphicBuffer.h> #include <utils/Errors.h> #include <chrono> #include <condition_variable> #include <mutex> #include <regex> #include <unordered_map> #include "CameraParameters.h" #include "system/camera_metadata.h" using ::android::hardware::Return; using ::android::hardware::Void; Loading Loading @@ -2480,11 +2481,12 @@ TEST_F(CameraHidlTest, processCaptureRequestPreview) { settings = req; }); ASSERT_TRUE(ret.isOk()); sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width, previewStream.height, sp<GraphicBuffer> gb = new GraphicBuffer( previewStream.width, previewStream.height, static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat), 1, halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage); 1, android_convertGralloc1To0Usage( halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage)); ASSERT_NE(nullptr, gb.get()); StreamBuffer outputBuffer = {halStreamConfig.streams[0].id, bufferId, hidl_handle(gb->getNativeBuffer()->handle), Loading Loading @@ -2586,11 +2588,12 @@ TEST_F(CameraHidlTest, processCaptureRequestInvalidSinglePreview) { &session /*out*/, &previewStream /*out*/, &halStreamConfig /*out*/); sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width, previewStream.height, sp<GraphicBuffer> gb = new GraphicBuffer( previewStream.width, previewStream.height, static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat), 1, halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage); 1, android_convertGralloc1To0Usage( halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage)); StreamBuffer outputBuffer = {halStreamConfig.streams[0].id, bufferId, hidl_handle(gb->getNativeBuffer()->handle), Loading Loading @@ -2706,11 +2709,12 @@ TEST_F(CameraHidlTest, flushPreviewRequest) { settings = req; }); ASSERT_TRUE(ret.isOk()); sp<GraphicBuffer> gb = new GraphicBuffer(previewStream.width, previewStream.height, sp<GraphicBuffer> gb = new GraphicBuffer( previewStream.width, previewStream.height, static_cast<int32_t>(halStreamConfig.streams[0].overrideFormat), 1, halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage); 1, android_convertGralloc1To0Usage( halStreamConfig.streams[0].producerUsage, halStreamConfig.streams[0].consumerUsage)); ASSERT_NE(nullptr, gb.get()); StreamBuffer outputBuffer = {halStreamConfig.streams[0].id, bufferId, hidl_handle(gb->getNativeBuffer()->handle), Loading