diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-09 00:06:34 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-09 00:06:34 +0000 |
commit | 9214913988f1c0d01fa1d49519156a0efc310ec2 (patch) | |
tree | 9d4e1ae609d6a0f7e1d041cab6c048ceff80ae9f | |
parent | 9182db1b7db6e405922bd9769da44b12c34538d2 (diff) | |
parent | 973b3ecc50eb456e94cb7b6f914d6fec0217f7a1 (diff) | |
download | camera-9214913988f1c0d01fa1d49519156a0efc310ec2.tar.gz |
Snap for 7894766 from 973b3ecc50eb456e94cb7b6f914d6fec0217f7a1 to sc-d2-release
Change-Id: Id581e6608b71bab1d8759d6e0c1db6a2ccada9f0
-rw-r--r-- | common/hal/utils/result_dispatcher.cc | 12 | ||||
-rw-r--r-- | common/hal/utils/result_dispatcher.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/common/hal/utils/result_dispatcher.cc b/common/hal/utils/result_dispatcher.cc index 89487fb..8a9753d 100644 --- a/common/hal/utils/result_dispatcher.cc +++ b/common/hal/utils/result_dispatcher.cc @@ -66,8 +66,8 @@ ResultDispatcher::ResultDispatcher( ResultDispatcher::~ResultDispatcher() { ATRACE_CALL(); { - std::unique_lock<std::mutex> lock(notify_callback_lock); - notify_callback_thread_exiting = true; + std::unique_lock<std::mutex> lock(notify_callback_lock_); + notify_callback_thread_exiting_ = true; } notify_callback_condition_.notify_one(); @@ -229,7 +229,7 @@ status_t ResultDispatcher::AddResult(std::unique_ptr<CaptureResult> result) { } } { - std::unique_lock<std::mutex> lock(notify_callback_lock); + std::unique_lock<std::mutex> lock(notify_callback_lock_); is_result_shutter_updated_ = true; notify_callback_condition_.notify_one(); } @@ -260,7 +260,7 @@ status_t ResultDispatcher::AddShutter(uint32_t frame_number, shutter_it->second.timestamp_ns = timestamp_ns; shutter_it->second.ready = true; { - std::unique_lock<std::mutex> lock(notify_callback_lock); + std::unique_lock<std::mutex> lock(notify_callback_lock_); is_result_shutter_updated_ = true; notify_callback_condition_.notify_one(); } @@ -399,8 +399,8 @@ void ResultDispatcher::NotifyCallbackThreadLoop() { NotifyFinalResultMetadata(); NotifyBuffers(); - std::unique_lock<std::mutex> lock(notify_callback_lock); - if (notify_callback_thread_exiting) { + std::unique_lock<std::mutex> lock(notify_callback_lock_); + if (notify_callback_thread_exiting_) { ALOGV("%s: NotifyCallbackThreadLoop exits.", __FUNCTION__); return; } diff --git a/common/hal/utils/result_dispatcher.h b/common/hal/utils/result_dispatcher.h index 5acc90a..0d94ec8 100644 --- a/common/hal/utils/result_dispatcher.h +++ b/common/hal/utils/result_dispatcher.h @@ -179,13 +179,13 @@ class ResultDispatcher { // A thread to run NotifyCallbackThreadLoop(). std::thread notify_callback_thread_; - std::mutex notify_callback_lock; + std::mutex notify_callback_lock_; // Condition to wake up notify_callback_thread_. Used with notify_callback_lock. std::condition_variable notify_callback_condition_; // Protected by notify_callback_lock. - bool notify_callback_thread_exiting = false; + bool notify_callback_thread_exiting_ = false; // State of callback thread is notified or not. volatile bool is_result_shutter_updated_ = false; |