Allow using custom widths and colors for layer borders.

Update the enableBorder API in SurfaceComposerClient so
that width and color can be specified for the border.
The information propagates through the pipe all the
way to the render engine so it can render the correct color
and width for the border

Test:go/wm-smoke.
Test: LayerBorder_test
Bug: 226529222

Change-Id: Id3ab853d5b4d6899a915f729b0d7be701cb5b167
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index 430d673..c65191c 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -753,8 +753,13 @@
         for (const auto& id : borderInfo.layerIds) {
             info.combinedRegion.orSelf(*(layerVisibleRegionMap[id]));
         }
-        outputCompositionState.borderInfoList.emplace_back(std::move(info));
-        clientComposeTopLayer |= !info.combinedRegion.isEmpty();
+
+        if (!info.combinedRegion.isEmpty()) {
+            info.width = borderInfo.width;
+            info.color = borderInfo.color;
+            outputCompositionState.borderInfoList.emplace_back(std::move(info));
+            clientComposeTopLayer = true;
+        }
     }
 
     // In this situation we must client compose the top layer instead of using hwc
@@ -1218,6 +1223,8 @@
     clientCompositionDisplay.colorTransform = outputState.colorTransformMatrix;
     for (auto& info : outputState.borderInfoList) {
         renderengine::BorderRenderInfo borderInfo;
+        borderInfo.width = info.width;
+        borderInfo.color = info.color;
         borderInfo.combinedRegion = info.combinedRegion;
         clientCompositionDisplay.borderInfoList.emplace_back(std::move(borderInfo));
     }