mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-24 05:17:18 +02:00
hle: service: nvflinger: buffer_queue_consumer: Use scoped_lock instead of unique_lock.
This commit is contained in:
parent
13aa0a1f24
commit
07c7f96fb2
@ -21,7 +21,7 @@ Status BufferItemConsumer::AcquireBuffer(BufferItem* item, std::chrono::nanoseco
|
|||||||
return Status::BadValue;
|
return Status::BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_lock lock(mutex);
|
std::scoped_lock lock(mutex);
|
||||||
|
|
||||||
if (const auto status = AcquireBufferLocked(item, present_when); status != Status::NoError) {
|
if (const auto status = AcquireBufferLocked(item, present_when); status != Status::NoError) {
|
||||||
if (status != Status::NoBufferAvailable) {
|
if (status != Status::NoBufferAvailable) {
|
||||||
@ -40,7 +40,7 @@ Status BufferItemConsumer::AcquireBuffer(BufferItem* item, std::chrono::nanoseco
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, Fence& release_fence) {
|
Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, Fence& release_fence) {
|
||||||
std::unique_lock lock(mutex);
|
std::scoped_lock lock(mutex);
|
||||||
|
|
||||||
if (const auto status = AddReleaseFenceLocked(item.buf, item.graphic_buffer, release_fence);
|
if (const auto status = AddReleaseFenceLocked(item.buf, item.graphic_buffer, release_fence);
|
||||||
status != Status::NoError) {
|
status != Status::NoError) {
|
||||||
|
Loading…
Reference in New Issue
Block a user