drm_hwcomposer: Tidy-up DrmDevice class
1. Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
2. Remove DrmDevice self-reference.
3. Replace shared_ptr reference to DrmDevice in DrmFbImporter with a
pointer, making ResourceManager only owner of DrmDevice and its
chilren.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/hwc2_device/DrmHwcTwo.cpp b/hwc2_device/DrmHwcTwo.cpp
index 698c1e5..31c1440 100644
--- a/hwc2_device/DrmHwcTwo.cpp
+++ b/hwc2_device/DrmHwcTwo.cpp
@@ -42,7 +42,7 @@
return HWC2::Error::BadDisplay;
}
auto display_planes = std::vector<DrmPlane *>();
- for (const auto &plane : drm->planes()) {
+ for (const auto &plane : drm->GetPlanes()) {
if (plane->IsCrtcSupported(*crtc))
display_planes.push_back(plane.get());
}
@@ -164,7 +164,7 @@
}
void DrmHwcTwo::HandleInitialHotplugState(DrmDevice *drmDevice) {
- for (const auto &conn : drmDevice->connectors()) {
+ for (const auto &conn : drmDevice->GetConnectors()) {
int display_id = drmDevice->GetDisplayId(conn.get());
auto &display = displays_.at(display_id);
@@ -178,7 +178,7 @@
void DrmHwcTwo::HandleHotplugUEvent() {
for (const auto &drm : resource_manager_.GetDrmDevices()) {
- for (const auto &conn : drm->connectors()) {
+ for (const auto &conn : drm->GetConnectors()) {
int display_id = drm->GetDisplayId(conn.get());
bool old_state = conn->IsConnected();