summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/display/vi_display.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-11-12 04:15:51 +0100
committerbunnei <bunneidev@gmail.com>2022-03-25 02:13:33 +0100
commit7f4165fc056261820fe760629e6ac7b1f27de003 (patch)
tree08280fbbb370fd0a3af1282229ff3a84b8081d49 /src/core/hle/service/vi/display/vi_display.h
parenthle: nvflinger: Add implementation for HosBinderDriverServer service. (diff)
downloadyuzu-7f4165fc056261820fe760629e6ac7b1f27de003.tar
yuzu-7f4165fc056261820fe760629e6ac7b1f27de003.tar.gz
yuzu-7f4165fc056261820fe760629e6ac7b1f27de003.tar.bz2
yuzu-7f4165fc056261820fe760629e6ac7b1f27de003.tar.lz
yuzu-7f4165fc056261820fe760629e6ac7b1f27de003.tar.xz
yuzu-7f4165fc056261820fe760629e6ac7b1f27de003.tar.zst
yuzu-7f4165fc056261820fe760629e6ac7b1f27de003.zip
Diffstat (limited to 'src/core/hle/service/vi/display/vi_display.h')
-rw-r--r--src/core/hle/service/vi/display/vi_display.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h
index 329f4ba86..9cf324395 100644
--- a/src/core/hle/service/vi/display/vi_display.h
+++ b/src/core/hle/service/vi/display/vi_display.h
@@ -15,12 +15,17 @@ namespace Kernel {
class KEvent;
}
-namespace Service::NVFlinger {
-class BufferQueue;
+namespace android {
+class BufferQueueProducer;
}
+
namespace Service::KernelHelpers {
class ServiceContext;
-} // namespace Service::KernelHelpers
+}
+
+namespace Service::NVFlinger {
+class HosBinderDriverServer;
+}
namespace Service::VI {
@@ -35,12 +40,13 @@ public:
/// Constructs a display with a given unique ID and name.
///
/// @param id The unique ID for this display.
+ /// @param hos_binder_driver_server_ NVFlinger HOSBinderDriver server instance.
/// @param service_context_ The ServiceContext for the owning service.
/// @param name_ The name for this display.
/// @param system_ The global system instance.
///
- Display(u64 id, std::string name_, KernelHelpers::ServiceContext& service_context_,
- Core::System& system_);
+ Display(u64 id, std::string name_, NVFlinger::HosBinderDriverServer& hos_binder_driver_server_,
+ KernelHelpers::ServiceContext& service_context_, Core::System& system_);
~Display();
/// Gets the unique ID assigned to this display.
@@ -64,6 +70,10 @@ public:
/// Gets a layer for this display based off an index.
const Layer& GetLayer(std::size_t index) const;
+ std::size_t GetNumLayers() const {
+ return layers.size();
+ }
+
/// Gets the readable vsync event.
Kernel::KReadableEvent& GetVSyncEvent();
@@ -72,10 +82,10 @@ public:
/// Creates and adds a layer to this display with the given ID.
///
- /// @param layer_id The ID to assign to the created layer.
- /// @param buffer_queue The buffer queue for the layer instance to use.
+ /// @param layer_id The ID to assign to the created layer.
+ /// @param binder_id The ID assigned to the buffer queue.
///
- void CreateLayer(u64 layer_id, NVFlinger::BufferQueue& buffer_queue);
+ void CreateLayer(u64 layer_id, u32 binder_id);
/// Closes and removes a layer from this display with the given ID.
///
@@ -104,9 +114,10 @@ public:
private:
u64 display_id;
std::string name;
+ NVFlinger::HosBinderDriverServer& hos_binder_driver_server;
KernelHelpers::ServiceContext& service_context;
- std::vector<std::shared_ptr<Layer>> layers;
+ std::vector<std::unique_ptr<Layer>> layers;
Kernel::KEvent* vsync_event{};
};