drm_hwcomposer: Allow for multiple transforms at once

Because sometimes one just ain't enough, allow more than
one transform at a time.

Bug: chrome-os-partner:46710
Test: Tested with the CTS Verifier "Camera Orientation" test

Change-Id: Ie5f9bbbc7c89964feafc78150e18512861c85b69
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/drmhwcomposer.h b/drmhwcomposer.h
index e0f8d2b..d087873 100644
--- a/drmhwcomposer.h
+++ b/drmhwcomposer.h
@@ -119,13 +119,13 @@
 template <typename T>
 using DrmHwcRect = separate_rects::Rect<T>;
 
-enum class DrmHwcTransform : uint32_t {
+enum DrmHwcTransform {
   kIdentity = 0,
-  kFlipH = HWC_TRANSFORM_FLIP_H,
-  kFlipV = HWC_TRANSFORM_FLIP_V,
-  kRotate90 = HWC_TRANSFORM_ROT_90,
-  kRotate180 = HWC_TRANSFORM_ROT_180,
-  kRotate270 = HWC_TRANSFORM_ROT_270,
+  kFlipH = 1 << 0,
+  kFlipV = 1 << 1,
+  kRotate90 = 1 << 2,
+  kRotate180 = 1 << 3,
+  kRotate270 = 1 << 4,
 };
 
 enum class DrmHwcBlending : int32_t {
@@ -139,7 +139,7 @@
   int gralloc_buffer_usage = 0;
   DrmHwcBuffer buffer;
   DrmHwcNativeHandle handle;
-  DrmHwcTransform transform = DrmHwcTransform::kIdentity;
+  uint32_t transform;
   DrmHwcBlending blending = DrmHwcBlending::kNone;
   uint8_t alpha = 0xff;
   DrmHwcRect<float> source_crop;