summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/display/LogicalDisplay.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-10-18 00:06:47 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-18 00:06:48 -0700
commit586503d51fbcc622af62b43b25579ce2f299d68b (patch)
treedc68e1a9233db3cfbcbbee31fc01dc94cc3fc15a /services/java/com/android/server/display/LogicalDisplay.java
parentbd4f2181077ab35a26bcca115c1337e78814bb9d (diff)
parent27f1d674bf9fb53af7facdcb746912e036d5bf75 (diff)
downloadframeworks_base-586503d51fbcc622af62b43b25579ce2f299d68b.zip
frameworks_base-586503d51fbcc622af62b43b25579ce2f299d68b.tar.gz
frameworks_base-586503d51fbcc622af62b43b25579ce2f299d68b.tar.bz2
Merge "Add special mirroring modes for demonstration purposes." into jb-mr1-dev
Diffstat (limited to 'services/java/com/android/server/display/LogicalDisplay.java')
-rw-r--r--services/java/com/android/server/display/LogicalDisplay.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/java/com/android/server/display/LogicalDisplay.java b/services/java/com/android/server/display/LogicalDisplay.java
index 680662e..aa7ea82 100644
--- a/services/java/com/android/server/display/LogicalDisplay.java
+++ b/services/java/com/android/server/display/LogicalDisplay.java
@@ -241,10 +241,13 @@ final class LogicalDisplay {
// is rotated when the contents of the logical display are rendered.
int orientation = Surface.ROTATION_0;
if (device == mPrimaryDisplayDevice
- && (displayDeviceInfo.flags & DisplayDeviceInfo.FLAG_SUPPORTS_ROTATION) != 0) {
+ && (displayDeviceInfo.flags & DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT) != 0) {
orientation = displayInfo.rotation;
}
+ // Apply the physical rotation of the display device itself.
+ orientation = (orientation + displayDeviceInfo.rotation) % 4;
+
// Set the frame.
// The frame specifies the rotated physical coordinates into which the viewport
// is mapped. We need to take care to preserve the aspect ratio of the viewport.