summaryrefslogtreecommitdiff
path: root/libs/input/TouchVideoFrame.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2023-10-05 15:40:38 -0700
committer Xin Li <delphij@google.com> 2023-10-05 15:40:38 -0700
commit1961b2f7b191744f3fc6bb4d32f0da0ce3ee0567 (patch)
treeb9785db180fb54b3a776f645cbb2a7ef480e0cb9 /libs/input/TouchVideoFrame.cpp
parente4b64ebecf894e3047e46894a83ab8d37feabd3e (diff)
parent313d1596d818bc94fbab3d42b8c50306871f74a5 (diff)
Merge Android 14
Bug: 298295554 Merged-In: I114a4cf83978f152959a6ec244d322603ff5257b Change-Id: Ia35ae6e11052fcc3b2bdaabd6dc57d0d223de269
Diffstat (limited to 'libs/input/TouchVideoFrame.cpp')
-rw-r--r--libs/input/TouchVideoFrame.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/input/TouchVideoFrame.cpp b/libs/input/TouchVideoFrame.cpp
index c62e0985f1..6d7d5614c6 100644
--- a/libs/input/TouchVideoFrame.cpp
+++ b/libs/input/TouchVideoFrame.cpp
@@ -40,16 +40,19 @@ const std::vector<int16_t>& TouchVideoFrame::getData() const { return mData; }
const struct timeval& TouchVideoFrame::getTimestamp() const { return mTimestamp; }
-void TouchVideoFrame::rotate(int32_t orientation) {
+void TouchVideoFrame::rotate(ui::Rotation orientation) {
switch (orientation) {
- case DISPLAY_ORIENTATION_90:
- rotateQuarterTurn(false /*clockwise*/);
+ case ui::ROTATION_90:
+ rotateQuarterTurn(/*clockwise=*/false);
break;
- case DISPLAY_ORIENTATION_180:
+ case ui::ROTATION_180:
rotate180();
break;
- case DISPLAY_ORIENTATION_270:
- rotateQuarterTurn(true /*clockwise*/);
+ case ui::ROTATION_270:
+ rotateQuarterTurn(/*clockwise=*/true);
+ break;
+ case ui::ROTATION_0:
+ // No need to rotate if there's no rotation.
break;
}
}