File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1920,8 +1920,7 @@ void PMTraceConsumer::AddPresentToCompletedList(std::shared_ptr<PresentEvent> co
19201920 UpdateReadyCount (present);
19211921
19221922 {
1923- std::lock_guard<std::mutex> lock (mPresentEventMutex );
1924-
1923+ std::unique_lock<std::mutex> lock (mPresentEventMutex );
19251924 // It's possible for a deferred condition to never be cleared. e.g., a process' last present
19261925 // doesn't get a Present_Stop event. When this happens the deferred present will prevent all
19271926 // subsequent presents from other processes from being dequeued until the ring buffer wraps and
@@ -1935,6 +1934,8 @@ void PMTraceConsumer::AddPresentToCompletedList(std::shared_ptr<PresentEvent> co
19351934 deferredPresent->IsLost = true ;
19361935 deferredPresent->WaitingForPresentStop = false ;
19371936 deferredPresent->WaitingForFlipFrameType = false ;
1937+ // UpdateReadyCount also locks the mPresentEventMutex so unlock here
1938+ lock.unlock ();
19381939 UpdateReadyCount (deferredPresent);
19391940 }
19401941 }
You can’t perform that action at this time.
0 commit comments