summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlikaid <likaid@codeaurora.org>2015-07-28 14:04:18 +0800
committerSteve Kondik <steve@cyngn.com>2016-08-03 15:44:39 -0700
commit322b414c1957a3c8761569873de3a1d3af1a9cd9 (patch)
tree968ec33e2a32b4a2ac9ec1e29d12ba18dcf38292
parente0b7ffe41424df1bb2bd547e95be8420709140cc (diff)
downloadandroid_packages_apps_Snap-322b414c1957a3c8761569873de3a1d3af1a9cd9.zip
android_packages_apps_Snap-322b414c1957a3c8761569873de3a1d3af1a9cd9.tar.gz
android_packages_apps_Snap-322b414c1957a3c8761569873de3a1d3af1a9cd9.tar.bz2
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
-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 7d378ce..5f74adc 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -514,9 +514,6 @@ public class WideAnglePanoramaModule
mMosaicPreviewRenderer = renderer;
mCameraTexture = mMosaicPreviewRenderer.getInputSurfaceTexture();
- if (!mPaused && !mThreadRunning && mWaitProcessorTask == null) {
- mMainHandler.sendEmptyMessage(MSG_RESET_TO_PREVIEW);
- }
mRendererLock.notifyAll();
}
mMosaicPreviewConfigured = true;
@@ -534,9 +531,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