mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 08:42:45 +01:00
hle: nvflinger: Add implementation for BufferItem class.
This commit is contained in:
parent
d13e18a8ed
commit
c723db39c7
2 changed files with 47 additions and 0 deletions
|
@ -538,6 +538,7 @@ add_library(core STATIC
|
|||
hle/service/nvflinger/buffer_queue.cpp
|
||||
hle/service/nvflinger/buffer_queue.h
|
||||
hle/service/nvflinger/binder.h
|
||||
hle/service/nvflinger/buffer_item.h
|
||||
hle/service/nvflinger/buffer_queue_defs.h
|
||||
hle/service/nvflinger/buffer_transform_flags.h
|
||||
hle/service/nvflinger/consumer_listener.h
|
||||
|
|
46
src/core/hle/service/nvflinger/buffer_item.h
Normal file
46
src/core/hle/service/nvflinger/buffer_item.h
Normal file
|
@ -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
|
Loading…
Reference in a new issue