diff options
author | Long Ling <longling@google.com> | 2022-01-19 10:30:00 -0800 |
---|---|---|
committer | Long Ling <longling@google.com> | 2022-01-25 15:42:42 -0800 |
commit | d8af1e98d3cbec78b0306bef8145dc233be70a02 (patch) | |
tree | 4c0a0ce8cfe7509cce28154a7423082353fd2776 /hwc3/impl/HalImpl.cpp | |
parent | ca14fd522f8cf02766bee9180b40069d0ad16adc (diff) |
hwc3: get display mount orientation
Bug: 214461751
Change-Id: I32ae0d09d3555be28d152b02719e76f1bcf42350
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r-- | hwc3/impl/HalImpl.cpp | 12 |
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; } |