diff options
author | Roman Stratiienko <roman.o.stratiienko@globallogic.com> | 2021-12-30 19:23:14 +0200 |
---|---|---|
committer | Roman Stratiienko <roman.o.stratiienko@globallogic.com> | 2022-01-12 10:47:23 +0200 |
commit | f815d38c2ad191b3cbe7e259b9ef2fc974875b72 (patch) | |
tree | f5bf30af368d1aaf10a359f16fe31c0ebcded454 /drm | |
parent | 57b9ba3a7dc78318184eec74a4a0bbce4d2ce759 (diff) | |
download | drm_hwcomposer-f815d38c2ad191b3cbe7e259b9ef2fc974875b72.tar.gz |
drm_hwcomposer: Raise clang-tidy level of some files to NORMAL
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Diffstat (limited to 'drm')
-rw-r--r-- | drm/DrmPlane.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drm/DrmPlane.cpp b/drm/DrmPlane.cpp index bce1800..25a4902 100644 --- a/drm/DrmPlane.cpp +++ b/drm/DrmPlane.cpp @@ -33,6 +33,7 @@ DrmPlane::DrmPlane(DrmDevice *drm, drmModePlanePtr p) : drm_(drm), id_(p->plane_id), possible_crtc_mask_(p->possible_crtcs), + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) formats_(p->formats, p->formats + p->count_formats) { } @@ -46,7 +47,7 @@ int DrmPlane::Init() { int ret = 0; uint64_t type = 0; std::tie(ret, type) = p.value(); - if (ret) { + if (ret != 0) { ALOGE("Failed to get plane type property value"); return ret; } @@ -150,7 +151,7 @@ bool DrmPlane::IsValidForLayer(DrmHwcLayer *layer) { } } - if (alpha_property_.id() == 0 && layer->alpha != 0xffff) { + if (alpha_property_.id() == 0 && layer->alpha != UINT16_MAX) { ALOGV("Alpha is not supported on plane %d", id_); return false; } @@ -190,15 +191,15 @@ bool DrmPlane::HasNonRgbFormat() const { static uint64_t ToDrmRotation(DrmHwcTransform transform) { uint64_t rotation = 0; - if (transform & DrmHwcTransform::kFlipH) + if ((transform & DrmHwcTransform::kFlipH) != 0) rotation |= DRM_MODE_REFLECT_X; - if (transform & DrmHwcTransform::kFlipV) + if ((transform & DrmHwcTransform::kFlipV) != 0) rotation |= DRM_MODE_REFLECT_Y; - if (transform & DrmHwcTransform::kRotate90) + if ((transform & DrmHwcTransform::kRotate90) != 0) rotation |= DRM_MODE_ROTATE_90; - else if (transform & DrmHwcTransform::kRotate180) + else if ((transform & DrmHwcTransform::kRotate180) != 0) rotation |= DRM_MODE_ROTATE_180; - else if (transform & DrmHwcTransform::kRotate270) + else if ((transform & DrmHwcTransform::kRotate270) != 0) rotation |= DRM_MODE_ROTATE_270; else rotation |= DRM_MODE_ROTATE_0; |