diff options
| author | 2021-12-03 10:37:54 +0000 | |
|---|---|---|
| committer | 2021-12-03 10:37:54 +0000 | |
| commit | f7c99f3f2404f9605c2801caa20b236a595afa3d (patch) | |
| tree | 724c88da6281ceb4225f8105bc14e56b0d591464 /libs/input/Input.cpp | |
| parent | d6a7f22182d88888c6ac2824a888766203d33dfc (diff) | |
Revert "Reland "Remove x/y offset from MotionEntry""
Revert submission 16336498-revert-16306432-revert-16295572-ORWQJPYRMQ-IQBEBXXQNX
Reason for revert: b/208849306
Reverted Changes:
I5afb6f7fd:Reland "Remove x/y offset from MotionEntry"
I68b5619bf:Reland "Input injection: Assume transformed values...
Change-Id: Id944e4eb39b26e3ffd51998b315a06e87a2af3d5
Diffstat (limited to 'libs/input/Input.cpp')
| -rw-r--r-- | libs/input/Input.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 69ea7dfcb5..8974b22c86 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -343,6 +343,11 @@ void PointerCoords::scale(float globalScaleFactor, float windowXScale, float win scaleAxisValue(*this, AMOTION_EVENT_AXIS_RELATIVE_Y, windowYScale); } +void PointerCoords::applyOffset(float xOffset, float yOffset) { + setAxisValue(AMOTION_EVENT_AXIS_X, getX() + xOffset); + setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset); +} + #ifdef __linux__ status_t PointerCoords::readFromParcel(Parcel* parcel) { bits = parcel->readInt64(); |