vi: remove superfluous locking in shared buffer manager
This commit is contained in:
parent
9f159dd62c
commit
668ff0db3a
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue