drm_hwcomposer: enable code analysis using clang-tidy
Drm hwcomposer project has some code-style inconsistencies.
This is the initial step to unify code-style of the code.
Clang-tidy is a great tool which can not only suggest correct styling,
but also allow predicting the errors in the code and suggest correct
coding approaches to avoid potential weaknesses.
CI was tuned to check clang-tidy recommendation for some part of the
code which is ready ATM (can be built outside AOSP tree).
For this part a limited set of clang-tidy checks has applied (coarse check).
Header files aren't checked at all.
Starting from now new code files must be included into the list that is
checked by almost all clang-tidy checks (fine checklist). New header files
should be also included into this list.
See '.gitlab-ci-clang-tidy-fine.sh'.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/DrmHwcTwo.h b/DrmHwcTwo.h
index 7a08d64..c75b2e9 100644
--- a/DrmHwcTwo.h
+++ b/DrmHwcTwo.h
@@ -137,7 +137,7 @@
HWC2::Error SetLayerSurfaceDamage(hwc_region_t damage);
HWC2::Error SetLayerTransform(int32_t transform);
HWC2::Error SetLayerVisibleRegion(hwc_region_t visible);
- HWC2::Error SetLayerZOrder(uint32_t z);
+ HWC2::Error SetLayerZOrder(uint32_t order);
private:
// sf_type_ stores the initial type given to us by surfaceflinger,
@@ -227,8 +227,9 @@
hwc_vsync_period_change_constraints_t *vsyncPeriodChangeConstraints,
hwc_vsync_period_change_timeline_t *outTimeline);
HWC2::Error SetAutoLowLatencyMode(bool on);
- HWC2::Error GetSupportedContentTypes(uint32_t *outNumSupportedContentTypes,
- uint32_t *outSupportedContentTypes);
+ HWC2::Error GetSupportedContentTypes(
+ uint32_t *outNumSupportedContentTypes,
+ const uint32_t *outSupportedContentTypes);
HWC2::Error SetContentType(int32_t contentType);
#endif