diff options
| author | 2022-12-02 16:43:18 +0000 | |
|---|---|---|
| committer | 2022-12-02 16:43:18 +0000 | |
| commit | aa20704476fdae2d0d1542a05f492ff0d83783b9 (patch) | |
| tree | 9b227262f705658b30f10f094ef8bba56264241c /libs/input/TouchVideoFrame.cpp | |
| parent | 9a319744a9c8c5043a0f9f235d41addd85a5cca3 (diff) | |
| parent | a9cf419caeebb019a6ca39fd43aab69f0956ae85 (diff) | |
Merge "Convert orientation values in input to ui::Rotation."
Diffstat (limited to 'libs/input/TouchVideoFrame.cpp')
| -rw-r--r-- | libs/input/TouchVideoFrame.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/input/TouchVideoFrame.cpp b/libs/input/TouchVideoFrame.cpp index c62e0985f1..c9393f4451 100644 --- a/libs/input/TouchVideoFrame.cpp +++ b/libs/input/TouchVideoFrame.cpp @@ -40,17 +40,20 @@ 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: + case ui::ROTATION_90: rotateQuarterTurn(false /*clockwise*/); break; - case DISPLAY_ORIENTATION_180: + case ui::ROTATION_180: rotate180(); break; - case DISPLAY_ORIENTATION_270: + case ui::ROTATION_270: rotateQuarterTurn(true /*clockwise*/); break; + case ui::ROTATION_0: + // No need to rotate if there's no rotation. + break; } } |