summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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:
65 ~FrameMailbox() { 65 ~FrameMailbox() {
66 // lock the mutex and clear out the present and free_queues and notify any people who are 66 // lock the mutex and clear out the present and free_queues and notify any people who are
67 // blocked to prevent deadlock on shutdown 67 // blocked to prevent deadlock on shutdown
68 std::scoped_lock lock(swap_chain_lock); 68 std::scoped_lock lock{swap_chain_lock};
69 std::queue<Frame*>().swap(free_queue); 69 std::queue<Frame*>().swap(free_queue);
70 present_queue.clear(); 70 present_queue.clear();
71 present_cv.notify_all(); 71 present_cv.notify_all();
@@ -115,7 +115,7 @@ public:
115 } 115 }
116 116
117 Frame* GetRenderFrame() { 117 Frame* GetRenderFrame() {
118 std::unique_lock<std::mutex> lock(swap_chain_lock); 118 std::unique_lock lock{swap_chain_lock};
119 119
120 // If theres no free frames, we will reuse the oldest render frame 120 // If theres no free frames, we will reuse the oldest render frame
121 if (free_queue.empty()) { 121 if (free_queue.empty()) {
@@ -130,13 +130,13 @@ public:
130 } 130 }
131 131
132 void ReleaseRenderFrame(Frame* frame) { 132 void ReleaseRenderFrame(Frame* frame) {
133 std::unique_lock<std::mutex> lock(swap_chain_lock); 133 std::unique_lock lock{swap_chain_lock};
134 present_queue.push_front(frame); 134 present_queue.push_front(frame);
135 present_cv.notify_one(); 135 present_cv.notify_one();
136 } 136 }
137 137
138 Frame* TryGetPresentFrame(int timeout_ms) { 138 Frame* TryGetPresentFrame(int timeout_ms) {
139 std::unique_lock<std::mutex> lock(swap_chain_lock); 139 std::unique_lock lock{swap_chain_lock};
140 // wait for new entries in the present_queue 140 // wait for new entries in the present_queue
141 present_cv.wait_for(lock, std::chrono::milliseconds(timeout_ms), 141 present_cv.wait_for(lock, std::chrono::milliseconds(timeout_ms),
142 [&] { return !present_queue.empty(); }); 142 [&] { return !present_queue.empty(); });