summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r--services/surfaceflinger/RegionSamplingThread.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp
index a484373caa..73de4f8b78 100644
--- a/services/surfaceflinger/RegionSamplingThread.cpp
+++ b/services/surfaceflinger/RegionSamplingThread.cpp
@@ -337,19 +337,7 @@ void RegionSamplingThread::captureSample() {
}
const auto device = mFlinger.getDefaultDisplayDevice();
- const auto orientation = [](uint32_t orientation) {
- switch (orientation) {
- default:
- case DisplayState::eOrientationDefault:
- return ui::Transform::ROT_0;
- case DisplayState::eOrientation90:
- return ui::Transform::ROT_90;
- case DisplayState::eOrientation180:
- return ui::Transform::ROT_180;
- case DisplayState::eOrientation270:
- return ui::Transform::ROT_270;
- }
- }(device->getOrientation());
+ const auto orientation = ui::Transform::toRotationFlags(device->getOrientation());
std::vector<RegionSamplingThread::Descriptor> descriptors;
Region sampleRegion;