mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-18 14:38:00 -05:00
service/vi/vi_layer: Convert Layer struct into a class
Like the previous changes made to the Display struct, this prepares the Layer struct for changes to its interface. Given Layer will be given more invariants in the future, we convert it into a class to better signify that.
This commit is contained in:
@ -91,7 +91,7 @@ std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) co
|
||||
return {};
|
||||
}
|
||||
|
||||
return layer->buffer_queue->GetId();
|
||||
return layer->GetBufferQueue().GetId();
|
||||
}
|
||||
|
||||
Kernel::SharedPtr<Kernel::ReadableEvent> NVFlinger::FindVsyncEvent(u64 display_id) const {
|
||||
@ -167,10 +167,10 @@ void NVFlinger::Compose() {
|
||||
|
||||
// TODO(Subv): Support more than 1 layer.
|
||||
VI::Layer& layer = display.GetLayer(0);
|
||||
auto& buffer_queue = layer.buffer_queue;
|
||||
auto& buffer_queue = layer.GetBufferQueue();
|
||||
|
||||
// Search for a queued buffer and acquire it
|
||||
auto buffer = buffer_queue->AcquireBuffer();
|
||||
auto buffer = buffer_queue.AcquireBuffer();
|
||||
|
||||
MicroProfileFlip();
|
||||
|
||||
@ -195,7 +195,7 @@ void NVFlinger::Compose() {
|
||||
igbp_buffer.width, igbp_buffer.height, igbp_buffer.stride,
|
||||
buffer->get().transform, buffer->get().crop_rect);
|
||||
|
||||
buffer_queue->ReleaseBuffer(buffer->get().slot);
|
||||
buffer_queue.ReleaseBuffer(buffer->get().slot);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user