summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-10-10 17:41:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-10 17:41:23 +0000
commit23df6752f1bf0cc7d13b3aa68e87a8dde36af2d4 (patch)
tree7b843b481adbe43714ea491565b3add37de2fd9a /src
parent47e437dea0d53310eba230a54724b30004de144f (diff)
parent18f20b9f460a8e329dd5af1e035d23931e7e1910 (diff)
downloadandroid_packages_apps_Snap-23df6752f1bf0cc7d13b3aa68e87a8dde36af2d4.tar.gz
android_packages_apps_Snap-23df6752f1bf0cc7d13b3aa68e87a8dde36af2d4.tar.bz2
android_packages_apps_Snap-23df6752f1bf0cc7d13b3aa68e87a8dde36af2d4.zip
Merge "Workaround for re-applying transform on new surface texuture" into gb-ub-photos-carlsbad
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/PhotoUI.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 3b4d04dc7..58751efbf 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -126,13 +126,6 @@ public class PhotoUI implements PieListener,
int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
int width = right - left;
int height = bottom - top;
- // Full-screen preview
- int w = width;
- int h = height;
- if (CameraUtil.getDisplayRotation(mActivity) % 180 != 0) {
- w = height;
- h = width;
- }
if (mPreviewWidth != width || mPreviewHeight != height) {
mPreviewWidth = width;
mPreviewHeight = height;
@@ -266,6 +259,11 @@ public class PhotoUI implements PieListener,
Log.v(TAG, "SurfaceTexture ready.");
mSurfaceTexture = surface;
mController.onPreviewUIReady();
+ // Workaround for b/11168275, see b/10981460 for more details
+ if (mPreviewWidth != 0 && mPreviewHeight != 0) {
+ // Re-apply transform matrix for new surface texture
+ setTransformMatrix(mPreviewWidth, mPreviewHeight);
+ }
}
@Override