diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-03-04 04:51:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 04:51:17 +0100 |
commit | ce8f4da63834be0179d98a7720dee47d65f3ec06 (patch) | |
tree | a9a9303a532d374db9ae8255e5f3f2487e370f84 /src/core/hle/service/nvnflinger/buffer_item.h | |
parent | Merge pull request #9855 from liamwhite/kern-16-support (diff) | |
parent | nvnflinger: fix name (diff) | |
download | yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.gz yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.bz2 yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.lz yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.xz yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.tar.zst yuzu-ce8f4da63834be0179d98a7720dee47d65f3ec06.zip |
Diffstat (limited to 'src/core/hle/service/nvnflinger/buffer_item.h')
-rw-r--r-- | src/core/hle/service/nvnflinger/buffer_item.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/hle/service/nvnflinger/buffer_item.h b/src/core/hle/service/nvnflinger/buffer_item.h new file mode 100644 index 000000000..7fd808f54 --- /dev/null +++ b/src/core/hle/service/nvnflinger/buffer_item.h @@ -0,0 +1,46 @@ +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2014 The Android Open Source Project +// SPDX-License-Identifier: GPL-3.0-or-later +// Parts of this implementation were based on: +// https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/include/gui/BufferItem.h + +#pragma once + +#include <memory> + +#include "common/common_types.h" +#include "common/math_util.h" +#include "core/hle/service/nvnflinger/ui/fence.h" +#include "core/hle/service/nvnflinger/window.h" + +namespace Service::android { + +class GraphicBuffer; + +class BufferItem final { +public: + constexpr BufferItem() = default; + + std::shared_ptr<GraphicBuffer> graphic_buffer; + Fence fence; + Common::Rectangle<s32> crop; + NativeWindowTransform transform{}; + u32 scaling_mode{}; + s64 timestamp{}; + bool is_auto_timestamp{}; + u64 frame_number{}; + + // The default value for buf, used to indicate this doesn't correspond to a slot. + static constexpr s32 INVALID_BUFFER_SLOT = -1; + union { + s32 slot{INVALID_BUFFER_SLOT}; + s32 buf; + }; + + bool is_droppable{}; + bool acquire_called{}; + bool transform_to_display_inverse{}; + s32 swap_interval{}; +}; + +} // namespace Service::android |