From 9f159dd62cbb1a4efe9c5cd724a94caf8c885793 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 19 Feb 2024 09:47:19 -0500 Subject: nvnflinger/vi: don't recreate buffer queue on open/close --- src/core/hle/service/nvnflinger/display.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/core/hle/service/nvnflinger/display.h') 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 - #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 layers; -}; - -struct Display { - explicit Display(u64 id_) { - id = id_; - } + std::vector> layers; - Layer* FindLayer(s32 consumer_id) { - for (auto& layer : stack.layers) { - if (layer.consumer_id == consumer_id) { - return &layer; + std::shared_ptr 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; -- cgit v1.2.3