summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index e516ede9d..3280020af 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -65,7 +65,7 @@ public:
~FrameMailbox() {
// lock the mutex and clear out the present and free_queues and notify any people who are
// blocked to prevent deadlock on shutdown
- std::scoped_lock lock(swap_chain_lock);
+ std::scoped_lock lock{swap_chain_lock};
std::queue<Frame*>().swap(free_queue);
present_queue.clear();
present_cv.notify_all();
@@ -115,7 +115,7 @@ public:
}
Frame* GetRenderFrame() {
- std::unique_lock<std::mutex> lock(swap_chain_lock);
+ std::unique_lock lock{swap_chain_lock};
// If theres no free frames, we will reuse the oldest render frame
if (free_queue.empty()) {
@@ -130,13 +130,13 @@ public:
}
void ReleaseRenderFrame(Frame* frame) {
- std::unique_lock<std::mutex> lock(swap_chain_lock);
+ std::unique_lock lock{swap_chain_lock};
present_queue.push_front(frame);
present_cv.notify_one();
}
Frame* TryGetPresentFrame(int timeout_ms) {
- std::unique_lock<std::mutex> lock(swap_chain_lock);
+ std::unique_lock lock{swap_chain_lock};
// wait for new entries in the present_queue
present_cv.wait_for(lock, std::chrono::milliseconds(timeout_ms),
[&] { return !present_queue.empty(); });