diff options
author | Fernando S <fsahmkow27@gmail.com> | 2022-03-25 03:36:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-25 03:36:55 +0100 |
commit | 0608336c60c62b74af73422115ee0e0797362e8f (patch) | |
tree | 33c9b4d79130736839fc28030950d401bf4fd81b /src/core/hle/service/nvflinger/buffer_item_consumer.h | |
parent | Merge pull request #8068 from ameerj/shader-if-false (diff) | |
parent | Update project license to GPL v3. (diff) | |
download | yuzu-0608336c60c62b74af73422115ee0e0797362e8f.tar yuzu-0608336c60c62b74af73422115ee0e0797362e8f.tar.gz yuzu-0608336c60c62b74af73422115ee0e0797362e8f.tar.bz2 yuzu-0608336c60c62b74af73422115ee0e0797362e8f.tar.lz yuzu-0608336c60c62b74af73422115ee0e0797362e8f.tar.xz yuzu-0608336c60c62b74af73422115ee0e0797362e8f.tar.zst yuzu-0608336c60c62b74af73422115ee0e0797362e8f.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_item_consumer.h')
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_item_consumer.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_item_consumer.h b/src/core/hle/service/nvflinger/buffer_item_consumer.h new file mode 100644 index 000000000..536db81e2 --- /dev/null +++ b/src/core/hle/service/nvflinger/buffer_item_consumer.h @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +// Copyright 2021 yuzu Emulator Project +// Copyright 2012 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/BufferItemConsumer.h + +#pragma once + +#include <chrono> +#include <memory> + +#include "common/common_types.h" +#include "core/hle/service/nvflinger/consumer_base.h" +#include "core/hle/service/nvflinger/status.h" + +namespace Service::android { + +class BufferItem; + +class BufferItemConsumer final : public ConsumerBase { +public: + explicit BufferItemConsumer(std::unique_ptr<BufferQueueConsumer> consumer); + Status AcquireBuffer(BufferItem* item, std::chrono::nanoseconds present_when, + bool wait_for_fence = true); + Status ReleaseBuffer(const BufferItem& item, Fence& release_fence); +}; + +} // namespace Service::android |