summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlikaid <likaid@codeaurora.org>2015-07-28 14:04:18 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-09-08 19:41:27 -0700
commit153934967692f8a033323bb6087c7b0df7796e35 (patch)
treeb37b1d83e53f2a34149b01b339dfef419029802c /src
parent007b0d24e854630caa4fdf07899e3aa5f4ad301b (diff)
downloadandroid_packages_apps_Snap-153934967692f8a033323bb6087c7b0df7796e35.tar.gz
android_packages_apps_Snap-153934967692f8a033323bb6087c7b0df7796e35.tar.bz2
android_packages_apps_Snap-153934967692f8a033323bb6087c7b0df7796e35.zip
SnapdragonCamera: Reduce the latency for panorama preview starting
In panorama mode preview, the stopPreview and startPreview were called three times after onResume from lockscreen, that caused the preview showing delay. Reduce the unnecessary stopPreview to improve the preview performance. CRs-Fixed: 876035 Change-Id: Ice5b0c305edb773867fd4803c190c98f5518ecb2
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index cd8f6fe65..26a8cb972 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -495,9 +495,6 @@ public class WideAnglePanoramaModule
mMosaicPreviewRenderer = renderer;
mCameraTexture = mMosaicPreviewRenderer.getInputSurfaceTexture();
- if (!mPaused && !mThreadRunning && mWaitProcessorTask == null) {
- mMainHandler.sendEmptyMessage(MSG_RESET_TO_PREVIEW);
- }
mRendererLock.notifyAll();
}
mMosaicPreviewConfigured = true;
@@ -515,9 +512,14 @@ public class WideAnglePanoramaModule
if (mCaptureState == CAPTURE_STATE_MOSAIC){
capturePending = true;
}
- mPreviewUIWidth = r - l;
- mPreviewUIHeight = b - t;
- configMosaicPreview();
+ int width = r -l;
+ int height = b - t;
+ if (mPreviewUIWidth != width || mPreviewUIHeight != height
+ || mCameraState != PREVIEW_ACTIVE) {
+ mPreviewUIWidth = r - l;
+ mPreviewUIHeight = b - t;
+ configMosaicPreview();
+ }
if (capturePending == true){
mMainHandler.post(new Runnable() {
@Override