diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-03-05 00:16:35 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-03-05 00:16:35 +0000 |
commit | 24ea31384715db1e1350efc4cc7f1dc55612fda9 (patch) | |
tree | 132a4a910bb175943083568b9d26fc0c14072568 | |
parent | dfaaaee9bef04d2182d01308be3b4111899bfd0f (diff) | |
parent | a1642feefb6f694b8d48ff66c6b75cbf84fd3a87 (diff) | |
download | android_frameworks_native-24ea31384715db1e1350efc4cc7f1dc55612fda9.tar.gz android_frameworks_native-24ea31384715db1e1350efc4cc7f1dc55612fda9.tar.bz2 android_frameworks_native-24ea31384715db1e1350efc4cc7f1dc55612fda9.zip |
Snap for 6263357 from a1642feefb6f694b8d48ff66c6b75cbf84fd3a87 to qt-qpr3-release
Change-Id: Ifdea83ee5c6db9e38295d00c1974079e9a19e546
-rw-r--r-- | libs/input/TouchVideoFrame.cpp | 4 | ||||
-rw-r--r-- | libs/input/tests/TouchVideoFrame_test.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libs/input/TouchVideoFrame.cpp b/libs/input/TouchVideoFrame.cpp index 8a4298a36..ce76e3fa6 100644 --- a/libs/input/TouchVideoFrame.cpp +++ b/libs/input/TouchVideoFrame.cpp @@ -42,13 +42,13 @@ const struct timeval& TouchVideoFrame::getTimestamp() const { return mTimestamp; void TouchVideoFrame::rotate(int32_t orientation) { switch (orientation) { case DISPLAY_ORIENTATION_90: - rotateQuarterTurn(true /*clockwise*/); + rotateQuarterTurn(false /*clockwise*/); break; case DISPLAY_ORIENTATION_180: rotate180(); break; case DISPLAY_ORIENTATION_270: - rotateQuarterTurn(false /*clockwise*/); + rotateQuarterTurn(true /*clockwise*/); break; } } diff --git a/libs/input/tests/TouchVideoFrame_test.cpp b/libs/input/tests/TouchVideoFrame_test.cpp index 815424ee3..fe06cad72 100644 --- a/libs/input/tests/TouchVideoFrame_test.cpp +++ b/libs/input/tests/TouchVideoFrame_test.cpp @@ -85,14 +85,14 @@ TEST(TouchVideoFrame, Rotate90_1x1) { TEST(TouchVideoFrame, Rotate90_2x2) { TouchVideoFrame frame(2, 2, {1, 2, 3, 4}, TIMESTAMP); - TouchVideoFrame frameRotated(2, 2, {3, 1, 4, 2}, TIMESTAMP); + TouchVideoFrame frameRotated(2, 2, {2, 4, 1, 3}, TIMESTAMP); frame.rotate(DISPLAY_ORIENTATION_90); ASSERT_EQ(frame, frameRotated); } TEST(TouchVideoFrame, Rotate90_3x2) { TouchVideoFrame frame(3, 2, {1, 2, 3, 4, 5, 6}, TIMESTAMP); - TouchVideoFrame frameRotated(2, 3, {5, 3, 1, 6, 4, 2}, TIMESTAMP); + TouchVideoFrame frameRotated(2, 3, {2, 4, 6, 1, 3, 5}, TIMESTAMP); frame.rotate(DISPLAY_ORIENTATION_90); ASSERT_EQ(frame, frameRotated); } @@ -170,14 +170,14 @@ TEST(TouchVideoFrame, Rotate270_1x1) { TEST(TouchVideoFrame, Rotate270_2x2) { TouchVideoFrame frame(2, 2, {1, 2, 3, 4}, TIMESTAMP); - TouchVideoFrame frameRotated(2, 2, {2, 4, 1, 3}, TIMESTAMP); + TouchVideoFrame frameRotated(2, 2, {3, 1, 4, 2}, TIMESTAMP); frame.rotate(DISPLAY_ORIENTATION_270); ASSERT_EQ(frame, frameRotated); } TEST(TouchVideoFrame, Rotate270_3x2) { TouchVideoFrame frame(3, 2, {1, 2, 3, 4, 5, 6}, TIMESTAMP); - TouchVideoFrame frameRotated(2, 3, {2, 4, 6, 1, 3, 5}, TIMESTAMP); + TouchVideoFrame frameRotated(2, 3, {5, 3, 1, 6, 4, 2}, TIMESTAMP); frame.rotate(DISPLAY_ORIENTATION_270); ASSERT_EQ(frame, frameRotated); } |