diff options
author | Doris Liu <tianliu@google.com> | 2013-10-09 20:51:23 -0700 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2013-10-10 10:35:09 -0700 |
commit | 18f20b9f460a8e329dd5af1e035d23931e7e1910 (patch) | |
tree | 9a4e0fdc5af6bb85d8a8ef001a5a026aa6b361aa /src | |
parent | 70d24b5b602ae56784d7f7bd6d79af7d37095553 (diff) | |
download | android_packages_apps_Snap-18f20b9f460a8e329dd5af1e035d23931e7e1910.tar.gz android_packages_apps_Snap-18f20b9f460a8e329dd5af1e035d23931e7e1910.tar.bz2 android_packages_apps_Snap-18f20b9f460a8e329dd5af1e035d23931e7e1910.zip |
Workaround for re-applying transform on new surface texuture
Bug: 10981460
Change-Id: Ic7fca757f3c1171317c76cd90fad43ff5c5ae5d2
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 12 |
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 |