summaryrefslogtreecommitdiff
path: root/hwc3/impl/HalImpl.cpp
diff options
context:
space:
mode:
authorLong Ling <longling@google.com>2022-01-26 02:34:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-01-26 02:34:39 +0000
commit7deb251c0f9f631f9be64801a2ec9734514e050a (patch)
tree21fe21fc5db50477bc3f8a63c8212a0200f31786 /hwc3/impl/HalImpl.cpp
parent2780fdfa1771ef6b0f8b6581e69c49593a85dd64 (diff)
parentd8af1e98d3cbec78b0306bef8145dc233be70a02 (diff)
Merge "hwc3: get display mount orientation"
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r--hwc3/impl/HalImpl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index ea632f3..9c26482 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -395,9 +395,15 @@ int32_t HalImpl::getDisplayedContentSamplingAttributes(
return HWC2_ERROR_UNSUPPORTED;
}
-int32_t HalImpl::getDisplayPhysicalOrientation([[maybe_unused]] int64_t display,
- [[maybe_unused]] common::Transform* orientation) {
- // TODO(b/214461751): return the physical orientation of the display
+int32_t HalImpl::getDisplayPhysicalOrientation(int64_t display,
+ common::Transform* orientation) {
+ ExynosDisplay* halDisplay;
+ RET_IF_ERR(getHalDisplay(display, halDisplay));
+
+ HwcMountOrientation hwcOrientation;
+ RET_IF_ERR(halDisplay->getMountOrientation(&hwcOrientation));
+ h2a::translate(hwcOrientation, *orientation);
+
return HWC2_ERROR_UNSUPPORTED;
}