This is a fetcher for getting the vector of DrmCrtc objects in DrmResources. Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxxxxx> Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx> --- Changes since v2: Sean Paul: - Replaced GetCrtcCount() with crtr() - Added r-b drmresources.cpp | 4 ++++ drmresources.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drmresources.cpp b/drmresources.cpp index 6b8ed03..ea23cce 100644 --- a/drmresources.cpp +++ b/drmresources.cpp @@ -245,6 +245,10 @@ DrmPlane *DrmResources::GetPlane(uint32_t id) const { return NULL; } +const std::vector<std::unique_ptr<DrmCrtc>> & DrmResources::crtcs() const { + return crtcs_; +} + uint32_t DrmResources::next_mode_id() { return ++mode_id_; } diff --git a/drmresources.h b/drmresources.h index 011f87e..5cca11b 100644 --- a/drmresources.h +++ b/drmresources.h @@ -68,6 +68,7 @@ class DrmResources { int GetConnectorProperty(const DrmConnector &connector, const char *prop_name, DrmProperty *property); + const std::vector<std::unique_ptr<DrmCrtc>> &crtcs() const; uint32_t next_mode_id(); int SetDisplayActiveMode(int display, const DrmMode &mode); int SetDpmsMode(int display, uint64_t mode); -- 2.11.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel