service: nvflinger: Improve synchronization for BufferQueue.

- Use proper mechanisms for blocking on DequeueBuffer.
- Ensure service thread terminates on emulation Shutdown.
This commit is contained in:
bunnei
2020-12-16 21:09:06 -08:00
parent bea51d948d
commit 6433b1dfd6
5 changed files with 72 additions and 19 deletions

View File

@ -107,7 +107,7 @@ private:
std::shared_ptr<Nvidia::Module> nvdrv;
std::vector<VI::Display> displays;
std::vector<BufferQueue> buffer_queues;
std::vector<std::unique_ptr<BufferQueue>> buffer_queues;
/// Id to use for the next layer that is created, this counter is shared among all displays.
u64 next_layer_id = 1;