summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2021-11-11 18:34:44 -0800
committerGravatar bunnei2022-03-24 18:13:32 -0700
commitb9cbc708e84d9b96dca6a93bbd70de85e6320f40 (patch)
treeee2047e85e34a3a41d3b47d7a45837730ac7a8cb /src/core
parenthle: nvflinger: Add ProducerListener interface. (diff)
downloadyuzu-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.txt1
-rw-r--r--src/core/hle/service/nvflinger/consumer_listener.h26
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
9namespace android {
10
11class 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.
15class IConsumerListener {
16public:
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