drm_hwcomposer: Stop using HWC2 hooks for layer plane alpha

Add an alpha member to LayerProperties and set it along with other
LayerCommand properties

Change-Id: Ib4e491718ec7772e6733f96a30dc63dcf0ed0598
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc2_device/HwcLayer.cpp b/hwc2_device/HwcLayer.cpp
index a993acf..2dd51ca 100644
--- a/hwc2_device/HwcLayer.cpp
+++ b/hwc2_device/HwcLayer.cpp
@@ -40,6 +40,10 @@
   if (layer_properties.display_frame) {
     layer_data_.pi.display_frame = layer_properties.display_frame.value();
   }
+  if (layer_properties.alpha) {
+    layer_data_.pi.alpha = std::lround(layer_properties.alpha.value() *
+                                       UINT16_MAX);
+  }
 }
 
 // NOLINTNEXTLINE(readability-convert-member-functions-to-static)
diff --git a/hwc2_device/HwcLayer.h b/hwc2_device/HwcLayer.h
index 953e589..6b234f7 100644
--- a/hwc2_device/HwcLayer.h
+++ b/hwc2_device/HwcLayer.h
@@ -35,6 +35,7 @@
     std::optional<BufferSampleRange> sample_range;
     std::optional<HWC2::Composition> composition_type;
     std::optional<hwc_rect_t> display_frame;
+    std::optional<float> alpha;
   };
 
   explicit HwcLayer(HwcDisplay *parent_display) : parent_(parent_display){};