CompositionEngine: fix HWC transform calculation

Use the correct display transform in calculateOutputRelativeBufferTransform().
When SF_PRIMARY_DISPLAY_ORIENTATION is set, DisplayDevice only updates the
logical to physical transform; OutputCompositionState.orientation doesn't
change.

Test: - OutputLayerTest.displayInstallOrientationBufferTransformSetTo90
      - Run "dumpsys SurfaceFlinger" on a device with SF_PRIMARY_DISPLAY_ORIENTATION
        set to 90 and verify that the HWC transform is 0 (identity)
      - screencap
Change-Id: I079b5ea22de8d47a7fb7233d01decfbd4b578be8
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index ce0222c..82d2422 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -231,7 +231,7 @@
      * (NOTE: the matrices are multiplied in reverse order)
      */
     const ui::Transform& layerTransform = layerState.geomLayerTransform;
-    const ui::Transform displayTransform{outputState.orientation};
+    const ui::Transform displayTransform{outputState.transform};
     const ui::Transform bufferTransform{layerState.geomBufferTransform};
     ui::Transform transform(displayTransform * layerTransform * bufferTransform);