summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Arpit Singh <arpitks@google.com> 2024-11-18 20:42:54 +0000
committer Arpit Singh <arpitks@google.com> 2024-12-02 08:27:53 +0000
commit1886eea92758e8c4d15ab4f3cdae54993d81d0d1 (patch)
treec7ab8d2be0ee34c939414c2bbbe668d61576695f /libs/input/PointerController.cpp
parent64a70881b3ca559559f416b54d2ec21dbb009fe4 (diff)
Expose current viewport transform of PointerController
This CL adds API to expose the current viewport transform of the PointerController. This will be used by Choreographer to find the target display and cursor position in the topology, when cursor moves across the displays. Test: presubmit Bug: 367660694 Flag: com.android.input.flags.connected_displays_cursor Change-Id: If4fe9fade2bf55f29db377661820ef7a8ca73ba2
Diffstat (limited to 'libs/input/PointerController.cpp')
-rw-r--r--libs/input/PointerController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index 883bc2f0e0f3..a713f1d1ed4d 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -299,6 +299,11 @@ void PointerController::clearSkipScreenshotFlags() {
mCursorController.setSkipScreenshot(false);
}
+ui::Transform PointerController::getDisplayTransform() const {
+ std::scoped_lock lock(getLock());
+ return getTransformForDisplayLocked(mLocked.pointerDisplayId);
+}
+
void PointerController::doInactivityTimeout() {
fade(Transition::GRADUAL);
}