diff options
author | bunnei <bunneidev@gmail.com> | 2021-11-12 03:38:36 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-03-25 02:13:32 +0100 |
commit | c723db39c7a508ca6445c328ab85f506bce4927a (patch) | |
tree | 03c040fcb33c81001464db349ecbecd5542a9fb0 /src/core/hle/service | |
parent | hle: nvflinger: Move implementation for Parcel to its own header. (diff) | |
download | yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.tar yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.tar.gz yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.tar.bz2 yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.tar.lz yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.tar.xz yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.tar.zst yuzu-c723db39c7a508ca6445c328ab85f506bce4927a.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_item.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_item.h b/src/core/hle/service/nvflinger/buffer_item.h new file mode 100644 index 000000000..9dc6f3fee --- /dev/null +++ b/src/core/hle/service/nvflinger/buffer_item.h @@ -0,0 +1,46 @@ +// 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/BufferItem.h + +#pragma once + +#include <memory> + +#include "common/common_types.h" +#include "core/hle/service/nvflinger/ui/fence.h" +#include "core/hle/service/nvflinger/ui/rect.h" +#include "core/hle/service/nvflinger/window.h" + +namespace android { + +class GraphicBuffer; + +class BufferItem final { +public: + constexpr BufferItem() = default; + + std::shared_ptr<GraphicBuffer> graphic_buffer; + Fence fence; + Rect 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 android |