Implement PointerController#getPositionInLogicalDisplay
PointerController#getPosition returns the pointer position in display absolute coordinate. Recently we're adding more usages of pointers in logical pointer coordinates. Currently, PointerController internally stores the position in logical coordinate, and getPosition returns the value applying the inverse display transform. When the user needs it in the logical coordinates, they reapply the transform to get the logical pointer position. Applying transform and inverse is unnecessary, and it is easily avoided by letting PointerController directly return the internal position. With this change, PointerController now has two methods for getting display absolute and logical positions. Bug: 431622043 Test: PointerChoreographerTest Test: PointerControllerTest Flag: EXEMPT refactor Change-Id: If8ab1ec94528f7fd203ae918bb0b684b1350f7b0
Loading
Please register or sign in to comment