@@ -241,6 +241,10 @@ DrmPlane *DrmResources::GetPlane(uint32_t id) const {
return NULL;
}
+uint32_t DrmResources::GetCrtcCount() const {
+ return (uint32_t) crtcs_.size();
+}
+
uint32_t DrmResources::next_mode_id() {
return ++mode_id_;
}
@@ -66,6 +66,7 @@ class DrmResources {
int GetConnectorProperty(const DrmConnector &connector, const char *prop_name,
DrmProperty *property);
+ uint32_t GetCrtcCount() const;
uint32_t next_mode_id();
int CreatePropertyBlob(void *data, size_t length, uint32_t *blob_id);
This GetCrtrcCount helper functions enables convenient fetching of the number of Crtcs from DrmResources. Signed-off-by: Robert Foss <robert.foss@collabora.com> --- drmresources.cpp | 4 ++++ drmresources.h | 1 + 2 files changed, 5 insertions(+)