diff options
author | Liam <byteslice@airmail.cc> | 2024-01-22 18:40:50 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 15:20:53 +0100 |
commit | 962c82540c304f909957776908aabcd261f2a7ba (patch) | |
tree | 707ab34565e8309b5ede21acebf36975da7718e7 /src/core/hle/service/vi/layer | |
parent | nvservices: unmap only on last container free (diff) | |
download | yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.gz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.bz2 yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.lz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.xz yuzu-962c82540c304f909957776908aabcd261f2a7ba.tar.zst yuzu-962c82540c304f909957776908aabcd261f2a7ba.zip |
Diffstat (limited to 'src/core/hle/service/vi/layer')
-rw-r--r-- | src/core/hle/service/vi/layer/vi_layer.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/vi/layer/vi_layer.h | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/core/hle/service/vi/layer/vi_layer.cpp b/src/core/hle/service/vi/layer/vi_layer.cpp index 493bd6e9e..eca35d82a 100644 --- a/src/core/hle/service/vi/layer/vi_layer.cpp +++ b/src/core/hle/service/vi/layer/vi_layer.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "core/hle/service/nvnflinger/hwc_layer.h" #include "core/hle/service/vi/layer/vi_layer.h" namespace Service::VI { @@ -8,8 +9,9 @@ namespace Service::VI { Layer::Layer(u64 layer_id_, u32 binder_id_, android::BufferQueueCore& core_, android::BufferQueueProducer& binder_, std::shared_ptr<android::BufferItemConsumer>&& consumer_) - : layer_id{layer_id_}, binder_id{binder_id_}, core{core_}, binder{binder_}, - consumer{std::move(consumer_)}, open{false}, visible{true} {} + : layer_id{layer_id_}, binder_id{binder_id_}, core{core_}, binder{binder_}, consumer{std::move( + consumer_)}, + blending{Nvnflinger::LayerBlending::None}, open{false}, visible{true} {} Layer::~Layer() = default; diff --git a/src/core/hle/service/vi/layer/vi_layer.h b/src/core/hle/service/vi/layer/vi_layer.h index b4b031ee7..14e229903 100644 --- a/src/core/hle/service/vi/layer/vi_layer.h +++ b/src/core/hle/service/vi/layer/vi_layer.h @@ -14,6 +14,10 @@ class BufferQueueCore; class BufferQueueProducer; } // namespace Service::android +namespace Service::Nvnflinger { +enum class LayerBlending : u32; +} + namespace Service::VI { /// Represents a single display layer. @@ -92,12 +96,21 @@ public: return !std::exchange(open, true); } + Nvnflinger::LayerBlending GetBlending() { + return blending; + } + + void SetBlending(Nvnflinger::LayerBlending b) { + blending = b; + } + private: const u64 layer_id; const u32 binder_id; android::BufferQueueCore& core; android::BufferQueueProducer& binder; std::shared_ptr<android::BufferItemConsumer> consumer; + Service::Nvnflinger::LayerBlending blending; bool open; bool visible; }; |