summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/GLRootView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/ui/GLRootView.java')
-rw-r--r--src/com/android/gallery3d/ui/GLRootView.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/ui/GLRootView.java b/src/com/android/gallery3d/ui/GLRootView.java
index e2268fa4e..6b76999b6 100644
--- a/src/com/android/gallery3d/ui/GLRootView.java
+++ b/src/com/android/gallery3d/ui/GLRootView.java
@@ -394,7 +394,11 @@ public class GLRootView extends GLSurfaceView
mRenderRequested = false;
- if ((mFlags & FLAG_NEED_LAYOUT) != 0) layoutContentPane();
+ if ((mOrientationSource != null
+ && mDisplayRotation != mOrientationSource.getDisplayRotation())
+ || (mFlags & FLAG_NEED_LAYOUT) != 0) {
+ layoutContentPane();
+ }
mCanvas.save(GLCanvas.SAVE_FLAG_ALL);
rotateCanvas(-mCompensation);