OSDN Git Service
(root)
/
android-x86
/
packages-apps-Gallery2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b72a2f
)
Fix inverted panorama preview
author
John Reck
<jreck@google.com>
Wed, 10 Oct 2012 05:10:13 +0000
(22:10 -0700)
committer
John Reck
<jreck@google.com>
Wed, 10 Oct 2012 05:12:29 +0000
(22:12 -0700)
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
patch
|
blob
|
history
diff --git
a/src/com/android/gallery3d/ui/PhotoView.java
b/src/com/android/gallery3d/ui/PhotoView.java
index
3086b24
..
214d0e0
100644
(file)
--- 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;
}