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

Commit 3e5ec70e authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Address missed comments for skipping viewport update

Bug: 239378650
Change-Id: Ibd71a8c320cafff1ee0efe7ff2e06addfab1ddfc
Test: presubmit
parent 5cb98562
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1031,8 +1031,9 @@ void TouchInputMapper::configureInputDevice(nsecs_t when, bool* outResetNeeded)
                    : getInverseRotation(mViewport.orientation);
            // For orientation-aware devices that work in the un-rotated coordinate space, the
            // viewport update should be skipped if it is only a change in the orientation.
            skipViewportUpdate = mParameters.orientationAware && mDisplayWidth == oldDisplayWidth &&
                    mDisplayHeight == oldDisplayHeight && viewportOrientationChanged;
            skipViewportUpdate = !viewportDisplayIdChanged && mParameters.orientationAware &&
                    mDisplayWidth == oldDisplayWidth && mDisplayHeight == oldDisplayHeight &&
                    viewportOrientationChanged;

            // Apply the input device orientation for the device.
            mInputDeviceOrientation =
@@ -1047,8 +1048,6 @@ void TouchInputMapper::configureInputDevice(nsecs_t when, bool* outResetNeeded)
            mDisplayHeight = rawHeight;
            mInputDeviceOrientation = DISPLAY_ORIENTATION_0;
        }
        // If displayId changed, do not skip viewport update.
        skipViewportUpdate &= !viewportDisplayIdChanged;
    }

    // If moving between pointer modes, need to reset some state.
+1 −3
Original line number Diff line number Diff line
@@ -6706,9 +6706,7 @@ TEST_F(SingleTouchInputMapperTest,
    NotifyMotionArgs motionArgs;

    // Down.
    int32_t x = 100;
    int32_t y = 200;
    processDown(mapper, x, y);
    processDown(mapper, 100, 200);
    processSync(mapper);

    // We should receive a down event