Loading services/camera/libcameraservice/device3/Camera3Device.cpp +23 −7 Original line number Diff line number Diff line Loading @@ -2226,6 +2226,14 @@ void Camera3Device::returnOutputBuffers( } } void Camera3Device::removeInFlightMapEntryLocked(int idx) { mInFlightMap.removeItemsAt(idx, 1); // Indicate idle inFlightMap to the status tracker if (mInFlightMap.size() == 0) { mStatusTracker->markComponentIdle(mInFlightStatusId, Fence::NO_FENCE); } } void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) { Loading Loading @@ -2261,13 +2269,7 @@ void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) { returnOutputBuffers(request.pendingOutputBuffers.array(), request.pendingOutputBuffers.size(), 0); mInFlightMap.removeItemsAt(idx, 1); // Indicate idle inFlightMap to the status tracker if (mInFlightMap.size() == 0) { mStatusTracker->markComponentIdle(mInFlightStatusId, Fence::NO_FENCE); } removeInFlightMapEntryLocked(idx); ALOGVV("%s: removed frame %d from InFlightMap", __FUNCTION__, frameNumber); } Loading Loading @@ -3442,6 +3444,20 @@ void Camera3Device::RequestThread::cleanUpFailedRequests(bool sendRequestError) captureRequest->mResultExtras); } } // Remove yet-to-be submitted inflight request from inflightMap { sp<Camera3Device> parent = mParent.promote(); if (parent != NULL) { Mutex::Autolock l(parent->mInFlightLock); ssize_t idx = parent->mInFlightMap.indexOfKey(captureRequest->mResultExtras.frameNumber); if (idx >= 0) { ALOGV("%s: Remove inflight request from queue: frameNumber %" PRId64, __FUNCTION__, captureRequest->mResultExtras.frameNumber); parent->removeInFlightMapEntryLocked(idx); } } } } Mutex::Autolock l(mRequestLock); Loading services/camera/libcameraservice/device3/Camera3Device.h +3 −0 Original line number Diff line number Diff line Loading @@ -852,6 +852,9 @@ class Camera3Device : /**** Scope for mInFlightLock ****/ // Remove the in-flight map entry of the given index from mInFlightMap. // It must only be called with mInFlightLock held. void removeInFlightMapEntryLocked(int idx); // Remove the in-flight request of the given index from mInFlightMap // if it's no longer needed. It must only be called with mInFlightLock held. void removeInFlightRequestIfReadyLocked(int idx); Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +23 −7 Original line number Diff line number Diff line Loading @@ -2226,6 +2226,14 @@ void Camera3Device::returnOutputBuffers( } } void Camera3Device::removeInFlightMapEntryLocked(int idx) { mInFlightMap.removeItemsAt(idx, 1); // Indicate idle inFlightMap to the status tracker if (mInFlightMap.size() == 0) { mStatusTracker->markComponentIdle(mInFlightStatusId, Fence::NO_FENCE); } } void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) { Loading Loading @@ -2261,13 +2269,7 @@ void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) { returnOutputBuffers(request.pendingOutputBuffers.array(), request.pendingOutputBuffers.size(), 0); mInFlightMap.removeItemsAt(idx, 1); // Indicate idle inFlightMap to the status tracker if (mInFlightMap.size() == 0) { mStatusTracker->markComponentIdle(mInFlightStatusId, Fence::NO_FENCE); } removeInFlightMapEntryLocked(idx); ALOGVV("%s: removed frame %d from InFlightMap", __FUNCTION__, frameNumber); } Loading Loading @@ -3442,6 +3444,20 @@ void Camera3Device::RequestThread::cleanUpFailedRequests(bool sendRequestError) captureRequest->mResultExtras); } } // Remove yet-to-be submitted inflight request from inflightMap { sp<Camera3Device> parent = mParent.promote(); if (parent != NULL) { Mutex::Autolock l(parent->mInFlightLock); ssize_t idx = parent->mInFlightMap.indexOfKey(captureRequest->mResultExtras.frameNumber); if (idx >= 0) { ALOGV("%s: Remove inflight request from queue: frameNumber %" PRId64, __FUNCTION__, captureRequest->mResultExtras.frameNumber); parent->removeInFlightMapEntryLocked(idx); } } } } Mutex::Autolock l(mRequestLock); Loading
services/camera/libcameraservice/device3/Camera3Device.h +3 −0 Original line number Diff line number Diff line Loading @@ -852,6 +852,9 @@ class Camera3Device : /**** Scope for mInFlightLock ****/ // Remove the in-flight map entry of the given index from mInFlightMap. // It must only be called with mInFlightLock held. void removeInFlightMapEntryLocked(int idx); // Remove the in-flight request of the given index from mInFlightMap // if it's no longer needed. It must only be called with mInFlightLock held. void removeInFlightRequestIfReadyLocked(int idx); Loading