2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

vi: remove superfluous locking in shared buffer manager

This commit is contained in:
Liam 2024-02-19 09:50:33 -05:00
parent 9f159dd62c
commit 668ff0db3a

View file

@ -322,8 +322,6 @@ Result SharedBufferManager::GetSharedBufferMemoryHandleId(u64* out_buffer_size,
Result SharedBufferManager::AcquireSharedFrameBuffer(android::Fence* out_fence, Result SharedBufferManager::AcquireSharedFrameBuffer(android::Fence* out_fence,
std::array<s32, 4>& out_slot_indexes, std::array<s32, 4>& out_slot_indexes,
s64* out_target_slot, u64 layer_id) { s64* out_target_slot, u64 layer_id) {
std::scoped_lock lk{m_guard};
// Get the producer. // Get the producer.
std::shared_ptr<android::BufferQueueProducer> producer; std::shared_ptr<android::BufferQueueProducer> producer;
R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id)); R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id));
@ -347,8 +345,6 @@ Result SharedBufferManager::PresentSharedFrameBuffer(android::Fence fence,
Common::Rectangle<s32> crop_region, Common::Rectangle<s32> crop_region,
u32 transform, s32 swap_interval, u64 layer_id, u32 transform, s32 swap_interval, u64 layer_id,
s64 slot) { s64 slot) {
std::scoped_lock lk{m_guard};
// Get the producer. // Get the producer.
std::shared_ptr<android::BufferQueueProducer> producer; std::shared_ptr<android::BufferQueueProducer> producer;
R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id)); R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id));
@ -379,8 +375,6 @@ Result SharedBufferManager::PresentSharedFrameBuffer(android::Fence fence,
} }
Result SharedBufferManager::CancelSharedFrameBuffer(u64 layer_id, s64 slot) { Result SharedBufferManager::CancelSharedFrameBuffer(u64 layer_id, s64 slot) {
std::scoped_lock lk{m_guard};
// Get the producer. // Get the producer.
std::shared_ptr<android::BufferQueueProducer> producer; std::shared_ptr<android::BufferQueueProducer> producer;
R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id)); R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id));
@ -394,8 +388,6 @@ Result SharedBufferManager::CancelSharedFrameBuffer(u64 layer_id, s64 slot) {
Result SharedBufferManager::GetSharedFrameBufferAcquirableEvent(Kernel::KReadableEvent** out_event, Result SharedBufferManager::GetSharedFrameBufferAcquirableEvent(Kernel::KReadableEvent** out_event,
u64 layer_id) { u64 layer_id) {
std::scoped_lock lk{m_guard};
// Get the producer. // Get the producer.
std::shared_ptr<android::BufferQueueProducer> producer; std::shared_ptr<android::BufferQueueProducer> producer;
R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id)); R_TRY(m_container.GetLayerProducerHandle(std::addressof(producer), layer_id));