summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-10-09 22:10:13 -0700
committerJohn Reck <jreck@google.com>2012-10-09 22:12:29 -0700
commit51eaa991537849bbe8e757cd4d1724ab72beffb1 (patch)
tree3b744c2494ea70a9f338153c83270aa444aa00bb
parent945a768725130741205b2ae949facce2de64c568 (diff)
downloadandroid_packages_apps_Snap-51eaa991537849bbe8e757cd4d1724ab72beffb1.tar.gz
android_packages_apps_Snap-51eaa991537849bbe8e757cd4d1724ab72beffb1.tar.bz2
android_packages_apps_Snap-51eaa991537849bbe8e757cd4d1724ab72beffb1.zip
Fix inverted panorama preview
Bug: 7314703 Panorama only support rotations of 0 and 90, so if it is greater than that flip the output surface texture Change-Id: I9885feb88d2d1c3e0dabaa7ecd8db66c2ddfb93b
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index 3086b2459..214d0e017 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -546,6 +546,10 @@ public class PhotoView extends GLView {
}
private int getPanoramaRotation() {
+ // Panorama only support rotations of 0 and 90, so if it is greater
+ // than that flip the output surface texture to compensate
+ if (mDisplayRotation > 180)
+ return (mCompensation + 180) % 360;
return mCompensation;
}