drm_hwcomposer: Tidy-up DrmCrtc class
Implement DrmCrtc instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move CRTC-to-Display binding information to the DrmDevice class.
Move drm/DrmCrtc.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmDevice.h b/drm/DrmDevice.h
index 9983d61..e3f6355 100644
--- a/drm/DrmDevice.h
+++ b/drm/DrmDevice.h
@@ -62,8 +62,6 @@
DrmConnector *GetConnectorForDisplay(int display) const;
DrmCrtc *GetCrtcForDisplay(int display) const;
- int GetCrtcProperty(const DrmCrtc &crtc, const char *prop_name,
- DrmProperty *property) const;
int GetConnectorProperty(const DrmConnector &connector, const char *prop_name,
DrmProperty *property) const;
@@ -108,6 +106,8 @@
std::pair<uint32_t, uint32_t> max_resolution_;
std::map<int, int> displays_;
+ std::map<int /*display*/, DrmCrtc *> bound_crtcs_;
+
bool HasAddFb2ModifiersSupport_{};
std::shared_ptr<DrmDevice> self;