diff options
author | bunnei <bunneidev@gmail.com> | 2021-11-12 03:34:44 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-03-25 02:13:32 +0100 |
commit | b9cbc708e84d9b96dca6a93bbd70de85e6320f40 (patch) | |
tree | ee2047e85e34a3a41d3b47d7a45837730ac7a8cb /src/core/hle/service/nvflinger | |
parent | hle: nvflinger: Add ProducerListener interface. (diff) | |
download | yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.gz yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.bz2 yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.lz yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.xz yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.tar.zst yuzu-b9cbc708e84d9b96dca6a93bbd70de85e6320f40.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger')
-rw-r--r-- | src/core/hle/service/nvflinger/consumer_listener.h | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +// Copyright 2021 yuzu Emulator Project +// Copyright 2014 The Android Open Source Project +// Parts of this implementation were base on: +// https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/include/gui/IConsumerListener.h + +#pragma once + +namespace android { + +class BufferItem; + +/// ConsumerListener is the interface through which the BufferQueue notifies the consumer of events +/// that the consumer may wish to react to. +class IConsumerListener { +public: + IConsumerListener() = default; + virtual ~IConsumerListener() = default; + + virtual void OnFrameAvailable(const BufferItem& item) = 0; + virtual void OnFrameReplaced(const BufferItem& item) = 0; + virtual void OnBuffersReleased() = 0; + virtual void OnSidebandStreamChanged() = 0; +}; + +}; // namespace android |