summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/layer
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-02-21 17:31:53 +0100
committerLioncash <mathew1800@gmail.com>2019-02-22 04:09:46 +0100
commit90528f132678ea7dfa9ac4588ae2b8c7808d4685 (patch)
tree57a37cad480b9ec528914a8fc67b699ec8ad016d /src/core/hle/service/vi/layer
parentservice/vi/vi_layer: Convert Layer struct into a class (diff)
downloadyuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.tar
yuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.tar.gz
yuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.tar.bz2
yuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.tar.lz
yuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.tar.xz
yuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.tar.zst
yuzu-90528f132678ea7dfa9ac4588ae2b8c7808d4685.zip
Diffstat (limited to 'src/core/hle/service/vi/layer')
-rw-r--r--src/core/hle/service/vi/layer/vi_layer.cpp7
-rw-r--r--src/core/hle/service/vi/layer/vi_layer.h12
2 files changed, 6 insertions, 13 deletions
diff --git a/src/core/hle/service/vi/layer/vi_layer.cpp b/src/core/hle/service/vi/layer/vi_layer.cpp
index 48f4c57cb..954225c26 100644
--- a/src/core/hle/service/vi/layer/vi_layer.cpp
+++ b/src/core/hle/service/vi/layer/vi_layer.cpp
@@ -2,16 +2,11 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include "common/assert.h"
#include "core/hle/service/vi/layer/vi_layer.h"
namespace Service::VI {
-Layer::Layer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> queue)
- : id{id}, buffer_queue{std::move(queue)}
-{
- ASSERT_MSG(buffer_queue != nullptr, "buffer_queue may not be null.");
-}
+Layer::Layer(u64 id, NVFlinger::BufferQueue& queue) : id{id}, buffer_queue{queue} {}
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 dd4f7e596..c6bfd01f6 100644
--- a/src/core/hle/service/vi/layer/vi_layer.h
+++ b/src/core/hle/service/vi/layer/vi_layer.h
@@ -4,8 +4,6 @@
#pragma once
-#include <memory>
-
#include "common/common_types.h"
namespace Service::NVFlinger {
@@ -22,14 +20,14 @@ public:
/// @param id The ID to assign to this layer.
/// @param queue The buffer queue for this layer to use.
///
- Layer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> queue);
+ Layer(u64 id, NVFlinger::BufferQueue& queue);
~Layer();
Layer(const Layer&) = delete;
Layer& operator=(const Layer&) = delete;
Layer(Layer&&) = default;
- Layer& operator=(Layer&&) = default;
+ Layer& operator=(Layer&&) = delete;
/// Gets the ID for this layer.
u64 GetID() const {
@@ -38,17 +36,17 @@ public:
/// Gets a reference to the buffer queue this layer is using.
NVFlinger::BufferQueue& GetBufferQueue() {
- return *buffer_queue;
+ return buffer_queue;
}
/// Gets a const reference to the buffer queue this layer is using.
const NVFlinger::BufferQueue& GetBufferQueue() const {
- return *buffer_queue;
+ return buffer_queue;
}
private:
u64 id;
- std::shared_ptr<NVFlinger::BufferQueue> buffer_queue;
+ NVFlinger::BufferQueue& buffer_queue;
};
} // namespace Service::VI