summaryrefslogtreecommitdiff
path: root/kms++util/inc
diff options
context:
space:
mode:
Diffstat (limited to 'kms++util/inc')
-rw-r--r--kms++util/inc/kms++util/kms++util.h1
-rw-r--r--kms++util/inc/kms++util/resourcemanager.h27
2 files changed, 28 insertions, 0 deletions
diff --git a/kms++util/inc/kms++util/kms++util.h b/kms++util/inc/kms++util/kms++util.h
index ca3c406..10a1f0a 100644
--- a/kms++util/inc/kms++util/kms++util.h
+++ b/kms++util/inc/kms++util/kms++util.h
@@ -8,6 +8,7 @@
#include <kms++util/extcpuframebuffer.h>
#include <kms++util/stopwatch.h>
#include <kms++util/opts.h>
+#include <kms++util/resourcemanager.h>
#include <cstdio>
#include <cstdlib>
diff --git a/kms++util/inc/kms++util/resourcemanager.h b/kms++util/inc/kms++util/resourcemanager.h
new file mode 100644
index 0000000..92e7b93
--- /dev/null
+++ b/kms++util/inc/kms++util/resourcemanager.h
@@ -0,0 +1,27 @@
+#include <kms++/kms++.h>
+#include <vector>
+#include <string>
+
+namespace kms {
+
+class ResourceManager
+{
+public:
+ ResourceManager(Card& card);
+
+ void reset();
+
+ Connector* reserve_connector(const std::string& name = "");
+ Crtc* reserve_crtc(Connector* conn);
+ Plane* reserve_plane(Crtc* crtc, PlaneType type, PixelFormat format = PixelFormat::Undefined);
+ Plane* reserve_primary_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
+ Plane* reserve_overlay_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
+
+private:
+ Card& m_card;
+ std::vector<Connector*> m_reserved_connectors;
+ std::vector<Crtc*> m_reserved_crtcs;
+ std::vector<Plane*> m_reserved_planes;
+};
+
+}