summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayDevice.cpp
diff options
context:
space:
mode:
authorSaurabh Shah <saurshah@codeaurora.org>2016-03-21 17:25:23 -0700
committerSteve Kondik <steve@cyngn.com>2016-07-20 04:16:16 -0700
commita887c19994c7873fbe651e2fe944a176576a6198 (patch)
tree107611910ed93ee1fb14fc8330aa1f8f1baadcbe /services/surfaceflinger/DisplayDevice.cpp
parentc91bafb88a3abf50c369637caf79fb027b48c46e (diff)
downloadframeworks_native-a887c19994c7873fbe651e2fe944a176576a6198.zip
frameworks_native-a887c19994c7873fbe651e2fe944a176576a6198.tar.gz
frameworks_native-a887c19994c7873fbe651e2fe944a176576a6198.tar.bz2
SF: Add support for all flips of panel mount
Add support for all flips of panel mount, H, V, HV (180). Property persist.panel.mountflip can be set to 1 for H-Flip, 2 for V-Flip, 3 for HV-Flip (180 / inverse mount). Change-Id: Ide7b8378ad6a423e5d7335fedc27d480a25b53ae CRs-fixed: 990622
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 92ccf2f..b83149b 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -142,10 +142,10 @@ DisplayDevice::DisplayDevice(
break;
}
- mPanelInverseMounted = false;
- // Check if panel is inverse mounted (contents show up HV flipped)
- property_get("persist.panel.inversemounted", property, "0");
- mPanelInverseMounted = !!atoi(property);
+ mPanelMountFlip = 0;
+ // 1: H-Flip, 2: V-Flip, 3: 180 (HV Flip)
+ property_get("persist.panel.mountflip", property, "0");
+ mPanelMountFlip = atoi(property);
// initialize the display orientation transform.
setProjection(DisplayState::eOrientationDefault, mViewport, mFrame);
@@ -428,8 +428,8 @@ status_t DisplayDevice::orientationToTransfrom(
return BAD_VALUE;
}
- if (DISPLAY_PRIMARY == mHwcDisplayId && isPanelInverseMounted()) {
- flags = flags ^ Transform::ROT_180;
+ if (DISPLAY_PRIMARY == mHwcDisplayId) {
+ flags = flags ^ getPanelMountFlip();
}
tr->set(flags, w, h);