mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-25 01:52:47 +00:00
hle: service: nvflinger: consumer_base: Use scoped_lock instead of unique_lock.
This commit is contained in:
parent
741a8c3034
commit
13aa0a1f24
|
@ -18,7 +18,7 @@ ConsumerBase::ConsumerBase(std::unique_ptr<BufferQueueConsumer> consumer_)
|
||||||
: consumer{std::move(consumer_)} {}
|
: consumer{std::move(consumer_)} {}
|
||||||
|
|
||||||
ConsumerBase::~ConsumerBase() {
|
ConsumerBase::~ConsumerBase() {
|
||||||
std::unique_lock lock(mutex);
|
std::scoped_lock lock(mutex);
|
||||||
|
|
||||||
ASSERT_MSG(is_abandoned, "consumer is not abandoned!");
|
ASSERT_MSG(is_abandoned, "consumer is not abandoned!");
|
||||||
}
|
}
|
||||||
|
@ -36,17 +36,17 @@ void ConsumerBase::FreeBufferLocked(s32 slot_index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsumerBase::OnFrameAvailable(const BufferItem& item) {
|
void ConsumerBase::OnFrameAvailable(const BufferItem& item) {
|
||||||
std::unique_lock lock(mutex);
|
std::scoped_lock lock(mutex);
|
||||||
LOG_DEBUG(Service_NVFlinger, "called");
|
LOG_DEBUG(Service_NVFlinger, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsumerBase::OnFrameReplaced(const BufferItem& item) {
|
void ConsumerBase::OnFrameReplaced(const BufferItem& item) {
|
||||||
std::unique_lock lock(mutex);
|
std::scoped_lock lock(mutex);
|
||||||
LOG_DEBUG(Service_NVFlinger, "called");
|
LOG_DEBUG(Service_NVFlinger, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsumerBase::OnBuffersReleased() {
|
void ConsumerBase::OnBuffersReleased() {
|
||||||
std::unique_lock lock(mutex);
|
std::scoped_lock lock(mutex);
|
||||||
LOG_DEBUG(Service_NVFlinger, "called");
|
LOG_DEBUG(Service_NVFlinger, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue