Loading services/camera/libcameraservice/device3/Camera3Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -3135,7 +3135,7 @@ bool Camera3Device::RequestThread::threadLoop() { mFlushLock.lock(); } ALOGVV("%s: %d: submitting %d requests in a batch.", __FUNCTION__, __LINE__, ALOGVV("%s: %d: submitting %zu requests in a batch.", __FUNCTION__, __LINE__, mNextRequests.size()); for (auto& nextRequest : mNextRequests) { // Submit request and block until ready for next one Loading services/camera/libcameraservice/device3/Camera3OutputStream.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -472,6 +472,12 @@ status_t Camera3OutputStream::configureQueueLocked() { __FUNCTION__, mTransform, strerror(-res), res); } // Set dequeueBuffer/attachBuffer timeout if the consumer is not hw composer or hw texture. // We need skip these cases as timeout will disable the non-blocking (async) mode. if (!(isConsumedByHWComposer() || isConsumedByHWTexture())) { mConsumer->setDequeueTimeout(kDequeueBufferTimeout); } /** * Camera3 Buffer manager is only supported by HAL3.3 onwards, as the older HALs requires * buffers to be statically allocated for internal static buffer registration, while the Loading Loading @@ -701,6 +707,17 @@ bool Camera3OutputStream::isConsumedByHWComposer() const { return (usage & GRALLOC_USAGE_HW_COMPOSER) != 0; } bool Camera3OutputStream::isConsumedByHWTexture() const { uint32_t usage = 0; status_t res = getEndpointUsage(&usage); if (res != OK) { ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); return false; } return (usage & GRALLOC_USAGE_HW_TEXTURE) != 0; } }; // namespace camera3 }; // namespace android services/camera/libcameraservice/device3/Camera3OutputStream.h +8 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,11 @@ class Camera3OutputStream : */ bool isConsumedByHWComposer() const; /** * Return if this output stream is consumed by hardware texture. */ bool isConsumedByHWTexture() const; /** * Return if the consumer configuration of this stream is deferred. */ Loading Loading @@ -181,6 +186,9 @@ class Camera3OutputStream : sp<Surface> mConsumer; private: static const nsecs_t kDequeueBufferTimeout = 1000000000; // 1 sec int mTransform; virtual status_t setTransformLocked(int transform); Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -3135,7 +3135,7 @@ bool Camera3Device::RequestThread::threadLoop() { mFlushLock.lock(); } ALOGVV("%s: %d: submitting %d requests in a batch.", __FUNCTION__, __LINE__, ALOGVV("%s: %d: submitting %zu requests in a batch.", __FUNCTION__, __LINE__, mNextRequests.size()); for (auto& nextRequest : mNextRequests) { // Submit request and block until ready for next one Loading
services/camera/libcameraservice/device3/Camera3OutputStream.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -472,6 +472,12 @@ status_t Camera3OutputStream::configureQueueLocked() { __FUNCTION__, mTransform, strerror(-res), res); } // Set dequeueBuffer/attachBuffer timeout if the consumer is not hw composer or hw texture. // We need skip these cases as timeout will disable the non-blocking (async) mode. if (!(isConsumedByHWComposer() || isConsumedByHWTexture())) { mConsumer->setDequeueTimeout(kDequeueBufferTimeout); } /** * Camera3 Buffer manager is only supported by HAL3.3 onwards, as the older HALs requires * buffers to be statically allocated for internal static buffer registration, while the Loading Loading @@ -701,6 +707,17 @@ bool Camera3OutputStream::isConsumedByHWComposer() const { return (usage & GRALLOC_USAGE_HW_COMPOSER) != 0; } bool Camera3OutputStream::isConsumedByHWTexture() const { uint32_t usage = 0; status_t res = getEndpointUsage(&usage); if (res != OK) { ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); return false; } return (usage & GRALLOC_USAGE_HW_TEXTURE) != 0; } }; // namespace camera3 }; // namespace android
services/camera/libcameraservice/device3/Camera3OutputStream.h +8 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,11 @@ class Camera3OutputStream : */ bool isConsumedByHWComposer() const; /** * Return if this output stream is consumed by hardware texture. */ bool isConsumedByHWTexture() const; /** * Return if the consumer configuration of this stream is deferred. */ Loading Loading @@ -181,6 +186,9 @@ class Camera3OutputStream : sp<Surface> mConsumer; private: static const nsecs_t kDequeueBufferTimeout = 1000000000; // 1 sec int mTransform; virtual status_t setTransformLocked(int transform); Loading