summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/vi.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-01-09 00:29:43 +0100
committerbunnei <bunneidev@gmail.com>2018-01-11 05:28:19 +0100
commitd205dee0a62c1310b6119175ef4f1963202f8a8a (patch)
tree0a25d6de515325ac5baefa459e283b07d0089c69 /src/core/hle/service/vi/vi.h
parentNV: Keep track of Displays, Layers and BufferQueues in nvflinger. (diff)
downloadyuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.tar
yuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.tar.gz
yuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.tar.bz2
yuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.tar.lz
yuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.tar.xz
yuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.tar.zst
yuzu-d205dee0a62c1310b6119175ef4f1963202f8a8a.zip
Diffstat (limited to 'src/core/hle/service/vi/vi.h')
-rw-r--r--src/core/hle/service/vi/vi.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h
index a83cd4902..029bd6831 100644
--- a/src/core/hle/service/vi/vi.h
+++ b/src/core/hle/service/vi/vi.h
@@ -39,7 +39,9 @@ public:
const IGBPBuffer& RequestBuffer(u32 slot) const;
void QueueBuffer(u32 slot);
- u32 GetId() const { return id; }
+ u32 GetId() const {
+ return id;
+ }
private:
u32 id;
@@ -65,10 +67,14 @@ struct Layer {
};
struct Display {
- std::string name;
+ Display(u64 id, std::string name);
+ ~Display() = default;
+
u64 id;
+ std::string name;
std::vector<Layer> layers;
+ Kernel::SharedPtr<Kernel::Event> vsync_event;
};
class NVFlinger {
@@ -85,8 +91,11 @@ public:
/// Gets the buffer queue id of the specified layer in the specified display.
u32 GetBufferQueueId(u64 display_id, u64 layer_id);
+ /// Gets the vsync event for the specified display.
+ Kernel::SharedPtr<Kernel::Event> GetVsyncEvent(u64 display_id);
+
/// Obtains a buffer queue identified by the id.
- std::shared_ptr<BufferQueue> GetBufferQueue(u32 id);
+ std::shared_ptr<BufferQueue> GetBufferQueue(u32 id) const;
private:
/// Returns the display identified by the specified id.
@@ -119,7 +128,6 @@ private:
void OpenLayer(Kernel::HLERequestContext& ctx);
void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx);
- Kernel::SharedPtr<Kernel::Event> vsync_event;
std::shared_ptr<NVFlinger> nv_flinger;
};