diff options
| author | 2021-11-11 18:35:28 -0800 | |
|---|---|---|
| committer | 2022-03-24 18:13:32 -0700 | |
| commit | fe9945ad6cc44ea234743bf085617d535342fab1 (patch) | |
| tree | 5b2f54ab9adca5e10e6a9ada31cadeb5165eaf70 /src | |
| parent | hle: nvflinger: Add IConsumerListener interface. (diff) | |
| download | yuzu-fe9945ad6cc44ea234743bf085617d535342fab1.tar.gz yuzu-fe9945ad6cc44ea234743bf085617d535342fab1.tar.xz yuzu-fe9945ad6cc44ea234743bf085617d535342fab1.zip | |
hle: nvflinger: Add IBinder interface.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/binder.h | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index eebd610c3..b8fdcbd1f 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -537,6 +537,7 @@ add_library(core STATIC | |||
| 537 | hle/service/nvdrv/syncpoint_manager.h | 537 | hle/service/nvdrv/syncpoint_manager.h |
| 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/binder.h | ||
| 540 | hle/service/nvflinger/buffer_transform_flags.h | 541 | hle/service/nvflinger/buffer_transform_flags.h |
| 541 | hle/service/nvflinger/consumer_listener.h | 542 | hle/service/nvflinger/consumer_listener.h |
| 542 | hle/service/nvflinger/nvflinger.cpp | 543 | hle/service/nvflinger/nvflinger.cpp |
diff --git a/src/core/hle/service/nvflinger/binder.h b/src/core/hle/service/nvflinger/binder.h new file mode 100644 index 000000000..2d9a23573 --- /dev/null +++ b/src/core/hle/service/nvflinger/binder.h | |||
| @@ -0,0 +1,42 @@ | |||
| 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/binder/IBinder.h | ||
| 6 | |||
| 7 | #pragma once | ||
| 8 | |||
| 9 | #include "common/common_types.h" | ||
| 10 | |||
| 11 | namespace Kernel { | ||
| 12 | class HLERequestContext; | ||
| 13 | class KReadableEvent; | ||
| 14 | } // namespace Kernel | ||
| 15 | |||
| 16 | namespace android { | ||
| 17 | |||
| 18 | enum class TransactionId { | ||
| 19 | RequestBuffer = 1, | ||
| 20 | SetBufferCount = 2, | ||
| 21 | DequeueBuffer = 3, | ||
| 22 | DetachBuffer = 4, | ||
| 23 | DetachNextBuffer = 5, | ||
| 24 | AttachBuffer = 6, | ||
| 25 | QueueBuffer = 7, | ||
| 26 | CancelBuffer = 8, | ||
| 27 | Query = 9, | ||
| 28 | Connect = 10, | ||
| 29 | Disconnect = 11, | ||
| 30 | AllocateBuffers = 13, | ||
| 31 | SetPreallocatedBuffer = 14, | ||
| 32 | GetBufferHistory = 17, | ||
| 33 | }; | ||
| 34 | |||
| 35 | class IBinder { | ||
| 36 | public: | ||
| 37 | virtual void Transact(Kernel::HLERequestContext& ctx, android::TransactionId code, | ||
| 38 | u32 flags) = 0; | ||
| 39 | virtual Kernel::KReadableEvent& GetNativeHandle() = 0; | ||
| 40 | }; | ||
| 41 | |||
| 42 | } // namespace android | ||