summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Evan Rosky <erosky@google.com> 2021-04-16 10:42:42 -0700
committer Evan Rosky <erosky@google.com> 2021-04-29 13:24:06 -0700
commit84f07f0cbec87736f3d04846a7558869d69a2005 (patch)
tree3c53336d3f203a99953f64a1827f6325a78426c6 /services/surfaceflinger/Layer.cpp
parent9e8dd09f886e14585d2018f713b7d384e768856a (diff)
Add enough information to compatibility-transform getRaw()
Many apps are mis-using getRaw (assuming it means screen-coordinates). This means, for now, we have to do a compatibility transform on the API to prevent breaking said apps. Fortunately, since the input window transform includes rotation, the only extra information we need to calculate this compat-raw is the display size. This CL topic pipes the display size around so that it makes into the MotionEvent and can be used to calculate getRaw() Bug: 179274888 Test: atest inputflinger_tests:InputDispatcherTest Change-Id: Iff893643312e8ec9f38eeb96d76a41fdb3a28350
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 7707aaf624..0d673eab78 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2449,6 +2449,8 @@ InputWindowInfo Layer::fillInputInfo(const sp<DisplayDevice>& display) {
ui::Transform toPhysicalDisplay;
if (display) {
toPhysicalDisplay = display->getTransform();
+ info.displayWidth = display->getWidth();
+ info.displayHeight = display->getHeight();
}
fillInputFrameInfo(info, toPhysicalDisplay);