diff options
author | Zhijun He <zhijunhe@google.com> | 2013-10-11 19:22:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-11 19:22:15 +0000 |
commit | d5ed2263a485d6e633fe08f033d04fad75daec6f (patch) | |
tree | 6122aedd6246cef0185d35d726ce1f6670a5d750 /services/camera/libcameraservice | |
parent | 1dd08b30e2366cabc50d883885d6229dab8218f2 (diff) | |
parent | b790abf4d17f1c6865af7eb1595ec94dc0306447 (diff) | |
download | frameworks_av-d5ed2263a485d6e633fe08f033d04fad75daec6f.zip frameworks_av-d5ed2263a485d6e633fe08f033d04fad75daec6f.tar.gz frameworks_av-d5ed2263a485d6e633fe08f033d04fad75daec6f.tar.bz2 |
Merge "Camera: Skip AE precapture when possible" into klp-dev
Diffstat (limited to 'services/camera/libcameraservice')
-rw-r--r-- | services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp index c8920bb..8a4ce4e 100644 --- a/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp +++ b/services/camera/libcameraservice/api1/client2/CaptureSequencer.cpp @@ -390,11 +390,23 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardStart( sp<Camera2Client> &client) { ATRACE_CALL(); + bool isAeConverged = false; // Get the onFrameAvailable callback when the requestID == mCaptureId client->registerFrameListener(mCaptureId, mCaptureId + 1, this); + + { + Mutex::Autolock l(mInputMutex); + isAeConverged = (mAEState == ANDROID_CONTROL_AE_STATE_CONVERGED); + } + { SharedParameters::Lock l(client->getParameters()); + // Skip AE precapture when it is already converged and not in force flash mode. + if (l.mParameters.flashMode != Parameters::FLASH_MODE_ON && isAeConverged) { + return STANDARD_CAPTURE; + } + mTriggerId = l.mParameters.precaptureTriggerCounter++; } client->getCameraDevice()->triggerPrecaptureMetering(mTriggerId); |