Updated MotionEvent to use Transform
Updated MotionEvent to use Transform instead of offset and scale. This
allowed a lot of simplification since it no longer needs to manually do
the transformation calculation and instead can rely on functions
provided by the Transform class.
Test: Input works
Test: inputflinger_tests
Test: libinput_tests
Bug: 158476194
Change-Id: Id40ae0184ca778507166e60d0d3eaf9564f3172b
diff --git a/libs/input/InputWindow.cpp b/libs/input/InputWindow.cpp
index 116b963..51190a0 100644
--- a/libs/input/InputWindow.cpp
+++ b/libs/input/InputWindow.cpp
@@ -174,7 +174,7 @@
}
touchableRegionCropHandle = parcel->readStrongBinder();
- transform.set(std::array<float, 9>{dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1});
+ transform.set({dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1});
return OK;
}