diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-11-02 13:08:19 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-11-02 13:08:19 -0800 |
commit | ccefa079decac1fca29e7d08dfde2c0af24696c3 (patch) | |
tree | eab9bd7e136abbbaca30bf238432d7c2f4944fb6 /src/com | |
parent | 6dd65e928f83b5f66130b402a31746e3f59b7799 (diff) | |
parent | 2f163f24a308b753493654d9b4720ee8b35acf81 (diff) | |
download | android_packages_apps_Snap-ccefa079decac1fca29e7d08dfde2c0af24696c3.tar.gz android_packages_apps_Snap-ccefa079decac1fca29e7d08dfde2c0af24696c3.tar.bz2 android_packages_apps_Snap-ccefa079decac1fca29e7d08dfde2c0af24696c3.zip |
Merge "Camera2: fix sawtooth in camera preview"
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 12 | ||||
-rw-r--r-- | src/com/android/camera/VideoUI.java | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 423ddb954..6e63c9475 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -278,15 +278,11 @@ public class PhotoUI implements PieListener, } } else { if (width > height) { - scaledTextureWidth = Math.max(width, - (int) (height * mAspectRatio)); - scaledTextureHeight = Math.max(height, - (int)(width / mAspectRatio)); + scaledTextureWidth = Math.max(width, height * mAspectRatio); + scaledTextureHeight = Math.max(height, width / mAspectRatio); } else { - scaledTextureWidth = Math.max(width, - (int) (height / mAspectRatio)); - scaledTextureHeight = Math.max(height, - (int) (width * mAspectRatio)); + scaledTextureWidth = Math.max(width, height / mAspectRatio); + scaledTextureHeight = Math.max(height, width * mAspectRatio); } } diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index 8de713adf..899226bb4 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -311,15 +311,11 @@ public class VideoUI implements PieRenderer.PieListener, } } else { if (width > height) { - scaledTextureWidth = Math.max(width, - (int) (height * mAspectRatio)); - scaledTextureHeight = Math.max(height, - (int)(width / mAspectRatio)); + scaledTextureWidth = Math.max(width, height * mAspectRatio); + scaledTextureHeight = Math.max(height, width / mAspectRatio); } else { - scaledTextureWidth = Math.max(width, - (int) (height / mAspectRatio)); - scaledTextureHeight = Math.max(height, - (int) (width * mAspectRatio)); + scaledTextureWidth = Math.max(width, height / mAspectRatio); + scaledTextureHeight = Math.max(height, width * mAspectRatio); } } |