diff options
author | Liam <byteslice@airmail.cc> | 2024-02-19 15:47:19 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-20 05:59:35 +0100 |
commit | 9f159dd62cbb1a4efe9c5cd724a94caf8c885793 (patch) | |
tree | 3b419db99ff18b0e7ea58789fd4767d888f3da58 /src/core/hle/service/nvnflinger/display.h | |
parent | Import keys from filesystem. (#13056) (diff) | |
download | yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.tar yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.tar.gz yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.tar.bz2 yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.tar.lz yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.tar.xz yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.tar.zst yuzu-9f159dd62cbb1a4efe9c5cd724a94caf8c885793.zip |
Diffstat (limited to 'src/core/hle/service/nvnflinger/display.h')
-rw-r--r-- | src/core/hle/service/nvnflinger/display.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/core/hle/service/nvnflinger/display.h b/src/core/hle/service/nvnflinger/display.h index f27cbf144..40aa59787 100644 --- a/src/core/hle/service/nvnflinger/display.h +++ b/src/core/hle/service/nvnflinger/display.h @@ -3,8 +3,6 @@ #pragma once -#include <list> - #include "core/hle/service/nvnflinger/buffer_item_consumer.h" #include "core/hle/service/nvnflinger/hwc_layer.h" @@ -26,18 +24,12 @@ struct Layer { }; struct LayerStack { - std::list<Layer> layers; -}; - -struct Display { - explicit Display(u64 id_) { - id = id_; - } + std::vector<std::shared_ptr<Layer>> layers; - Layer* FindLayer(s32 consumer_id) { - for (auto& layer : stack.layers) { - if (layer.consumer_id == consumer_id) { - return &layer; + std::shared_ptr<Layer> FindLayer(s32 consumer_id) { + for (auto& layer : layers) { + if (layer->consumer_id == consumer_id) { + return layer; } } @@ -45,7 +37,13 @@ struct Display { } bool HasLayers() { - return !stack.layers.empty(); + return !layers.empty(); + } +}; + +struct Display { + explicit Display(u64 id_) { + id = id_; } u64 id; |