diff options
author | Corey Tabaka <eieio@google.com> | 2017-08-03 17:14:08 -0700 |
---|---|---|
committer | Corey Tabaka <eieio@google.com> | 2017-08-03 17:14:08 -0700 |
commit | df0b91683d63f988036e214d2193d00fca31010c (patch) | |
tree | d52154d4c809ee37d216187480b486678c339bbf | |
parent | 42d6d5c8051c2f72ea258553eaa40062c1ec15c7 (diff) | |
download | native-df0b91683d63f988036e214d2193d00fca31010c.tar.gz |
Fix race condition clearing VSYNC enable on VrFlinger startup.
Fix VrFlinger to avoid touching the VSYNC enable setting in HWC
during startup by avoiding calling the cleanup code when entering
idle state for the first time.
Bug: 63626797
Test: Manual testing.
Change-Id: I5320bd5c1febb51367e759a8619d35f155789628
-rw-r--r-- | libs/vr/libvrflinger/hardware_composer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp index d937c889df..def9b7da33 100644 --- a/libs/vr/libvrflinger/hardware_composer.cpp +++ b/libs/vr/libvrflinger/hardware_composer.cpp @@ -821,8 +821,9 @@ void HardwareComposer::PostThread() { std::unique_lock<std::mutex> lock(post_thread_mutex_); ALOGI("HardwareComposer::PostThread: Entering quiescent state."); - // Tear down resources. - OnPostThreadPaused(); + // Tear down resources if necessary. + if (was_running) + OnPostThreadPaused(); was_running = false; post_thread_resumed_ = false; |