diff options
| author | Liam <byteslice@airmail.cc> | 2024-02-19 09:47:19 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2024-02-19 23:59:35 -0500 |
| commit | 9f159dd62cbb1a4efe9c5cd724a94caf8c885793 (patch) | |
| tree | 3b419db99ff18b0e7ea58789fd4767d888f3da58 /src/core/hle/service/nvnflinger/display.h | |
| parent | d1eaeeed8c2429547e584e1c8ef7abbdef1b7d36 (diff) | |
nvnflinger/vi: don't recreate buffer queue on open/close
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; |
