summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2020-10-08 13:15:27 -0700
committer chaviw <chaviw@google.com> 2020-10-08 13:18:09 -0700
commit387aff58f8da1f6b9eb27f7690b7d2128416bf93 (patch)
tree300f78b72ebedde61b6fdca97a97a14c89529117
parentad3b184c958aeccf5717b7948083ffad00ca8cb1 (diff)
Don't use physical orientation to compute area for screenshot
When computing the rotation for the screenshot, don't include the physical display orientation since it causes the incorrect orientation for screenshots Test: Set a physical display orientation and rotate display. This takes the screenshot with identity = true Bug: 157164835 Bug: 170056945 Change-Id: Ic938c5ecf09f5389fb0d0f96417ee9f39769a2c4
-rw-r--r--services/surfaceflinger/DisplayRenderArea.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/surfaceflinger/DisplayRenderArea.cpp b/services/surfaceflinger/DisplayRenderArea.cpp
index 9a6b328a1e..20486e0aa3 100644
--- a/services/surfaceflinger/DisplayRenderArea.cpp
+++ b/services/surfaceflinger/DisplayRenderArea.cpp
@@ -26,8 +26,7 @@ RenderArea::RotationFlags applyDeviceOrientation(bool useIdentityTransform,
return RenderArea::RotationFlags::ROT_0;
}
- const ui::Rotation orientation = display.getPhysicalOrientation() + display.getOrientation();
- return ui::Transform::toRotationFlags(orientation);
+ return ui::Transform::toRotationFlags(display.getOrientation());
}
} // namespace