use reserve_connector from ResourceManager
[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         Connector* reserve_connector(Connector* conn);
17         Crtc* reserve_crtc(Connector* conn);
18         Plane* reserve_plane(Crtc* crtc, PlaneType type, PixelFormat format = PixelFormat::Undefined);
19         Plane* reserve_primary_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
20         Plane* reserve_overlay_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined);
22 private:
23         Card& m_card;
24         std::vector<Connector*> m_reserved_connectors;
25         std::vector<Crtc*> m_reserved_crtcs;
26         std::vector<Plane*> m_reserved_planes;
27 };
29 }