Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a82aab2 authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Automerger Merge Worker
Browse files

Merge "Per-window input rotation: Remove projection from DisplayViewport" into...

Merge "Per-window input rotation: Remove projection from DisplayViewport" into sc-dev am: 110dd15f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13818808

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d7271728226b3c41a9982e7661501e9b5570e88
parents 3073720c 110dd15f
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -586,18 +586,13 @@ public class InputManagerService extends IInputManager.Stub
    private void setDisplayViewportsInternal(List<DisplayViewport> viewports) {
        final DisplayViewport[] vArray = new DisplayViewport[viewports.size()];
        if (ENABLE_PER_WINDOW_INPUT_ROTATION) {
            // Remove all viewport operations. They will be built-into the window transforms.
            // Remove display projection information from DisplayViewport, leaving only the
            // orientation. The display projection will be built-into the window transforms.
            for (int i = viewports.size() - 1; i >= 0; --i) {
                final DisplayViewport v = vArray[i] = viewports.get(i).makeCopy();
                // deviceWidth/Height are apparently in "rotated" space, so flip them if needed.
                if (v.orientation % 2 != 0) {
                    final int dw = v.deviceWidth;
                    v.deviceWidth = v.deviceHeight;
                    v.deviceHeight = dw;
                }
                // Note: the deviceWidth/Height are in rotated with the orientation.
                v.logicalFrame.set(0, 0, v.deviceWidth, v.deviceHeight);
                v.physicalFrame.set(0, 0, v.deviceWidth, v.deviceHeight);
                v.orientation = 0;
            }
        } else {
            for (int i = viewports.size() - 1; i >= 0; --i) {