mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-26 19:35:38 +01:00
buffer_item_consumer: Pass fence by const-ref in ReleaseBuffer()
This isn't directly modified. Also allows rvalues to be used with it.
This commit is contained in:
parent
3020f72b0c
commit
ae74f46e78
@ -39,7 +39,7 @@ Status BufferItemConsumer::AcquireBuffer(BufferItem* item, std::chrono::nanoseco
|
|||||||
return Status::NoError;
|
return Status::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, Fence& release_fence) {
|
Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, const Fence& release_fence) {
|
||||||
std::scoped_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);
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
explicit BufferItemConsumer(std::unique_ptr<BufferQueueConsumer> consumer);
|
explicit BufferItemConsumer(std::unique_ptr<BufferQueueConsumer> consumer);
|
||||||
Status AcquireBuffer(BufferItem* item, std::chrono::nanoseconds present_when,
|
Status AcquireBuffer(BufferItem* item, std::chrono::nanoseconds present_when,
|
||||||
bool wait_for_fence = true);
|
bool wait_for_fence = true);
|
||||||
Status ReleaseBuffer(const BufferItem& item, Fence& release_fence);
|
Status ReleaseBuffer(const BufferItem& item, const Fence& release_fence);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::android
|
} // namespace Service::android
|
||||||
|
@ -307,8 +307,7 @@ void NVFlinger::Compose() {
|
|||||||
|
|
||||||
swap_interval = buffer.swap_interval;
|
swap_interval = buffer.swap_interval;
|
||||||
|
|
||||||
auto fence = android::Fence::NoFence();
|
layer.GetConsumer().ReleaseBuffer(buffer, android::Fence::NoFence());
|
||||||
layer.GetConsumer().ReleaseBuffer(buffer, fence);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user