diff options
| author | 2021-11-11 18:34:44 -0800 | |
|---|---|---|
| committer | 2022-03-24 18:13:32 -0700 | |
| commit | b9cbc708e84d9b96dca6a93bbd70de85e6320f40 (patch) | |
| tree | ee2047e85e34a3a41d3b47d7a45837730ac7a8cb /src/core | |
| parent | hle: nvflinger: Add ProducerListener interface. (diff) | |
| download | yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.gz yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.xz yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.zip | |
hle: nvflinger: Add IConsumerListener interface.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/consumer_listener.h | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 3ddda2528..eebd610c3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -538,6 +538,7 @@ add_library(core STATIC | |||
| 538 | hle/service/nvflinger/buffer_queue.cpp | 538 | hle/service/nvflinger/buffer_queue.cpp |
| 539 | hle/service/nvflinger/buffer_queue.h | 539 | hle/service/nvflinger/buffer_queue.h |
| 540 | hle/service/nvflinger/buffer_transform_flags.h | 540 | hle/service/nvflinger/buffer_transform_flags.h |
| 541 | hle/service/nvflinger/consumer_listener.h | ||
| 541 | hle/service/nvflinger/nvflinger.cpp | 542 | hle/service/nvflinger/nvflinger.cpp |
| 542 | hle/service/nvflinger/nvflinger.h | 543 | hle/service/nvflinger/nvflinger.h |
| 543 | hle/service/nvflinger/pixel_format.h | 544 | hle/service/nvflinger/pixel_format.h |
diff --git a/src/core/hle/service/nvflinger/consumer_listener.h b/src/core/hle/service/nvflinger/consumer_listener.h new file mode 100644 index 000000000..0aa4ad17b --- /dev/null +++ b/src/core/hle/service/nvflinger/consumer_listener.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
| 2 | // Copyright 2021 yuzu Emulator Project | ||
| 3 | // Copyright 2014 The Android Open Source Project | ||
| 4 | // Parts of this implementation were base on: | ||
| 5 | // https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/include/gui/IConsumerListener.h | ||
| 6 | |||
| 7 | #pragma once | ||
| 8 | |||
| 9 | namespace android { | ||
| 10 | |||
| 11 | class BufferItem; | ||
| 12 | |||
| 13 | /// ConsumerListener is the interface through which the BufferQueue notifies the consumer of events | ||
| 14 | /// that the consumer may wish to react to. | ||
| 15 | class IConsumerListener { | ||
| 16 | public: | ||
| 17 | IConsumerListener() = default; | ||
| 18 | virtual ~IConsumerListener() = default; | ||
| 19 | |||
| 20 | virtual void OnFrameAvailable(const BufferItem& item) = 0; | ||
| 21 | virtual void OnFrameReplaced(const BufferItem& item) = 0; | ||
| 22 | virtual void OnBuffersReleased() = 0; | ||
| 23 | virtual void OnSidebandStreamChanged() = 0; | ||
| 24 | }; | ||
| 25 | |||
| 26 | }; // namespace android | ||