[Rounded Corners] Take display rotation into account.
Previously when we applied glScissor on the layer, we always assume after the
transformation, the layer already had the aligned coordinates. However, we
still need to take rotation into account such that the (left, top) and (right,
bottom) coordinates align with the display coordination space.
BUG: 129619488
Test: Build, flash and boot. Verify with different rotation.
Change-Id: I6db6d5465af3e1961477960d9cba5c7331fa1ba1
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 0345baf..0e498b7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3327,6 +3327,7 @@
clientCompositionDisplay.clip = displayState.scissor;
const ui::Transform& displayTransform = displayState.transform;
clientCompositionDisplay.globalTransform = displayTransform.asMatrix4();
+ clientCompositionDisplay.orientation = displayState.orientation;
const auto* profile = display->getDisplayColorProfile();
Dataspace outputDataspace = Dataspace::UNKNOWN;