diff options
| author | bunnei <bunneidev@gmail.com> | 2018-07-17 21:26:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-17 21:26:35 -0700 |
| commit | 7c3cc0895791fff03122386d25cce8d3cfdecd91 (patch) | |
| tree | 2d0b4946f698b4e8b44a47d8168961e80c83f9dc /src/core/hle/service/nvflinger/buffer_queue.cpp | |
| parent | 8e28af6f89b4160db96be299675132a0ced7374d (diff) | |
| parent | 03c2d049d43197a97b7899541e4b4763a2fb1eda (diff) | |
Merge pull request #677 from bunnei/crop-fb
Implement buffer cropping and default to handheld mode
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue.cpp')
| -rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue.cpp b/src/core/hle/service/nvflinger/buffer_queue.cpp index a181cd2dc..7132b18ad 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue.cpp @@ -57,13 +57,15 @@ const IGBPBuffer& BufferQueue::RequestBuffer(u32 slot) const { return itr->igbp_buffer; } -void BufferQueue::QueueBuffer(u32 slot, BufferTransformFlags transform) { +void BufferQueue::QueueBuffer(u32 slot, BufferTransformFlags transform, + const MathUtil::Rectangle<int>& crop_rect) { auto itr = std::find_if(queue.begin(), queue.end(), [&](const Buffer& buffer) { return buffer.slot == slot; }); ASSERT(itr != queue.end()); ASSERT(itr->status == Buffer::Status::Dequeued); itr->status = Buffer::Status::Queued; itr->transform = transform; + itr->crop_rect = crop_rect; } boost::optional<const BufferQueue::Buffer&> BufferQueue::AcquireBuffer() { |
