42e50001de6be3c2386e6cf142d29e608f2d5dee
[android/external-libkmsxx.git] / kms++util / inc / kms++util / resourcemanager.h
1 #include <kms++/kms++.h>
2 #include <vector>
3 #include <string>
5 namespace kms {
7 class ResourceManager
8 {
9 public:
10         ResourceManager(Card& card);
12         void reset();
14         Card& card() const { return m_card; }
15         Connector* reserve_connector(const std::string& name = "");
16         Crtc* reserve_crtc(Connector* conn);
17         Plane* reserve_plane(Crtc* crtc, PlaneType type, PixelFormat format = PixelFormat::Undefined);
18         Plane* reserve_primary_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
19         Plane* reserve_overlay_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
21 private:
22         Card& m_card;
23         std::vector<Connector*> m_reserved_connectors;
24         std::vector<Crtc*> m_reserved_crtcs;
25         std::vector<Plane*> m_reserved_planes;
26 };
28 }