@@ -61,7 +61,6 @@ CompositorBase::CompositorBase()
6161, m_OverlayCount(0 )
6262, m_ActiveOverlays()
6363, m_FrameMutex()
64- , m_FrameLock(m_FrameMutex, std::defer_lock)
6564, m_FrameEvent()
6665{
6766// We want to handle all graphics tasks explicitly instead of implicitly letting WaitGetPoses execute them
@@ -121,7 +120,6 @@ ovrResult CompositorBase::WaitToBeginFrame(ovrSession session, long long frameIn
121120MICROPROFILE_SCOPE (WaitToBeginFrame);
122121
123122// Protect the wait order with a mutex
124- // This also waits for any frame still in-flight
125123std::unique_lock<std::mutex> lk (m_FrameMutex);
126124
127125// Wait for any extra frames beyond just the next frame
@@ -140,11 +138,6 @@ ovrResult CompositorBase::WaitToBeginFrame(ovrSession session, long long frameIn
140138ovrResult CompositorBase::BeginFrame (ovrSession session, long long frameIndex)
141139{
142140MICROPROFILE_SCOPE (BeginFrame);
143-
144- // Lock the frame mutex only if we don't already own it
145- if (!m_FrameLock)
146- m_FrameLock.lock ();
147-
148141session->FrameIndex = frameIndex;
149142vr::VRCompositor ()->SubmitExplicitTimingData ();
150143return session->Input ->UpdateInputState ();
@@ -255,8 +248,6 @@ ovrResult CompositorBase::EndFrame(ovrSession session, ovrLayerHeader const * co
255248
256249// Frame now completed so we can let anyone waiting on the next frame call WaitGetPoses
257250m_FrameEvent.notify_all ();
258- if (m_FrameLock)
259- m_FrameLock.unlock ();
260251
261252if (m_MirrorTexture && error == vr::VRCompositorError_None)
262253RenderMirrorTexture (m_MirrorTexture);
0 commit comments