hwc2: Fix mismatch in client requested composition in dumpsys

Currently when requested layer is marked for skip by hwc, then the dumpsys shows
composition types as "Client/Client" instead of "Device/Client".
With this fix, we preserve the original composition requested by the client.

Change-Id: I18a03cf2228bd9eac30828feba6ba4d42c7cb8f8
CRs-Fixed: 2490973
diff --git a/composer/hwc_display.cpp b/composer/hwc_display.cpp
index ffbe236..00764b2 100644
--- a/composer/hwc_display.cpp
+++ b/composer/hwc_display.cpp
@@ -2338,7 +2338,7 @@
     *os << "layer: " << std::setw(4) << layer->GetId();
     *os << " z: " << layer->GetZ();
     *os << " composition: " <<
-          to_string(layer->GetClientRequestedCompositionType()).c_str();
+          to_string(layer->GetOrigClientRequestedCompositionType()).c_str();
     *os << "/" <<
           to_string(layer->GetDeviceSelectedCompositionType()).c_str();
     *os << " alpha: " << std::to_string(sdm_layer->plane_alpha).c_str();
diff --git a/composer/hwc_layers.cpp b/composer/hwc_layers.cpp
index f934040..b09c174 100644
--- a/composer/hwc_layers.cpp
+++ b/composer/hwc_layers.cpp
@@ -377,6 +377,7 @@
     layer_->update_mask.set(kClientCompRequest);
   }
   client_requested_ = type;
+  client_requested_orig_ = type;
   switch (type) {
     case HWC2::Composition::Client:
       break;
diff --git a/composer/hwc_layers.h b/composer/hwc_layers.h
index 1010842..31a602a 100644
--- a/composer/hwc_layers.h
+++ b/composer/hwc_layers.h
@@ -109,6 +109,7 @@
   HWC2::Error SetLayerColorTransform(const float *matrix);
   void SetComposition(const LayerComposition &sdm_composition);
   HWC2::Composition GetClientRequestedCompositionType() { return client_requested_; }
+  HWC2::Composition GetOrigClientRequestedCompositionType() { return client_requested_orig_; }
   void UpdateClientCompositionType(HWC2::Composition type) { client_requested_ = type; }
   HWC2::Composition GetDeviceSelectedCompositionType() { return device_selected_; }
   int32_t GetLayerDataspace() { return dataspace_; }
@@ -157,7 +158,9 @@
   bool buffer_flipped_ = false;
   bool secure_ = false;
 
-  // Composition requested by client(SF)
+  // Composition requested by client(SF) Original
+  HWC2::Composition client_requested_orig_ = HWC2::Composition::Device;
+  // Composition requested by client(SF) Modified for internel use
   HWC2::Composition client_requested_ = HWC2::Composition::Device;
   // Composition selected by SDM
   HWC2::Composition device_selected_ = HWC2::Composition::Device;