mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-09-04 09:49:02 +00: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;
|
||||
}
|
||||
|
||||
Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, Fence& release_fence) {
|
||||
Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, const Fence& release_fence) {
|
||||
std::scoped_lock lock{mutex};
|
||||
|
||||
if (const auto status = AddReleaseFenceLocked(item.buf, item.graphic_buffer, release_fence);
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
explicit BufferItemConsumer(std::unique_ptr<BufferQueueConsumer> consumer);
|
||||
Status AcquireBuffer(BufferItem* item, std::chrono::nanoseconds present_when,
|
||||
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
|
||||
|
@ -307,8 +307,7 @@ void NVFlinger::Compose() {
|
||||
|
||||
swap_interval = buffer.swap_interval;
|
||||
|
||||
auto fence = android::Fence::NoFence();
|
||||
layer.GetConsumer().ReleaseBuffer(buffer, fence);
|
||||
layer.GetConsumer().ReleaseBuffer(buffer, android::Fence::NoFence());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user