drm_hwcomposer: Simplify LayerTransform
Fixes clang-analyzer-optin.core.EnumCastOutOfRange clang tidy check.
Change-Id: I0a88d1ef084848c924198e8bd3831533b6578675
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/compositor/LayerData.h b/compositor/LayerData.h
index a808adc..7eb6cba 100644
--- a/compositor/LayerData.h
+++ b/compositor/LayerData.h
@@ -34,13 +34,11 @@
class DrmFbIdHandle;
/* Rotation is defined in the clockwise direction */
-enum LayerTransform : uint32_t {
- kIdentity = 0,
- kFlipH = 1 << 0,
- kFlipV = 1 << 1,
- kRotate90 = 1 << 2,
- kRotate180 = 1 << 3,
- kRotate270 = 1 << 4,
+/* The flip is done before rotation */
+struct LayerTransform {
+ bool hflip;
+ bool vflip;
+ bool rotate90;
};
struct PresentInfo {