gfxstream: handle multidisplay rotation correctly

Bug: 291669671
Change-Id: I52b17a83f843b2e46720b1a21bd276361df435cd
diff --git a/host/PostWorkerGl.cpp b/host/PostWorkerGl.cpp
index 8eb27da..47142b8 100644
--- a/host/PostWorkerGl.cpp
+++ b/host/PostWorkerGl.cpp
@@ -140,6 +140,11 @@
                     continue;
                 }
 
+                const auto transform = getTransformFromRotation(mFb->getZrot());
+                postLayerOptions.transform = transform;
+                if ( transform == HWC_TRANSFORM_ROT_90 || transform == HWC_TRANSFORM_ROT_270) {
+                    std::swap(currentDisplayW, currentDisplayH);
+                }
                 postLayerOptions.displayFrame = {
                     .left = static_cast<int>(currentDisplayOffsetX),
                     .top = static_cast<int>(currentDisplayOffsetY),
@@ -301,4 +306,4 @@
     mContextBound = false;
 }
 
-}  // namespace gfxstream
\ No newline at end of file
+}  // namespace gfxstream