Undo rotation by physical orientation in WindowInfo transforms
Some devices have a their display panels installed in a different
orientation than the expected default orientation. This can be
configured through the build prop
ro.surface_flinger.primary_display_orientation, or through other means.
Input, framework, and other services are not concerned with the display
panel orientation. In this CL, we rotate the transforms sent in
WindowInfo by the inverse of the physical orientation, making the window
transforms relative to WM's ROTATION_0 instead of the display panel
orientation.
Bug: 179274888
Bug: 195617582
Bug: 195586068
Test: manual with device that has a non-standard display panel
installation
Test: atest com.android.launcher3.ui.TaplTestsLauncher3
Merged-In: I727b22c004014355f337da2b753b61c5946667d0
Change-Id: I727b22c004014355f337da2b753b61c5946667d0
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 1e5429a..470103c 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -1073,7 +1073,7 @@
void fillTouchOcclusionMode(gui::WindowInfo& info);
// Fills in the frame and transform info for the gui::WindowInfo
- void fillInputFrameInfo(gui::WindowInfo& info, const ui::Transform& toPhysicalDisplay);
+ void fillInputFrameInfo(gui::WindowInfo& info, const ui::Transform& toNonRotatedDisplay);
// Cached properties computed from drawing state
// Effective transform taking into account parent transforms and any parent scaling, which is