From 51eaa991537849bbe8e757cd4d1724ab72beffb1 Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 9 Oct 2012 22:10:13 -0700 Subject: 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 --- src/com/android/gallery3d/ui/PhotoView.java | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3