drm_hwcomposer: Tidy-up DrmConnector class
Implement DrmConnector instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move Connector-to-CRTC binding information to the DrmDevice class.
Move drm/DrmConnector.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/VSyncWorker.cpp b/drm/VSyncWorker.cpp
index 0ac626e..3bcb4d0 100644
--- a/drm/VSyncWorker.cpp
+++ b/drm/VSyncWorker.cpp
@@ -87,11 +87,11 @@
float refresh = 60.0F; // Default to 60Hz refresh rate
DrmConnector *conn = drm_->GetConnectorForDisplay(display_);
- if (conn && conn->active_mode().v_refresh() != 0.0F)
- refresh = conn->active_mode().v_refresh();
+ if (conn && conn->GetActiveMode().v_refresh() != 0.0F)
+ refresh = conn->GetActiveMode().v_refresh();
else
ALOGW("Vsync worker active with conn=%p refresh=%f\n", conn,
- conn ? conn->active_mode().v_refresh() : 0.0F);
+ conn ? conn->GetActiveMode().v_refresh() : 0.0F);
int64_t phased_timestamp = GetPhasedVSync(kOneSecondNs /
static_cast<int>(refresh),