diff options
author | Angus Kong <shkong@google.com> | 2011-11-17 22:58:58 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-17 22:58:58 -0800 |
commit | 308eab755ffc14ec7aa754f93d88ce22dd9086a0 (patch) | |
tree | 2d491dce4ff4bf0d04fbcc667c048699a73bba18 | |
parent | 4d29bb4e32a2c0b1f58659e133caf2beaede8f55 (diff) | |
parent | 0cefcea01849364be6955a1b3f7e7d1639010abc (diff) | |
download | LegacyCamera-308eab755ffc14ec7aa754f93d88ce22dd9086a0.zip LegacyCamera-308eab755ffc14ec7aa754f93d88ce22dd9086a0.tar.gz LegacyCamera-308eab755ffc14ec7aa754f93d88ce22dd9086a0.tar.bz2 |
Merge "Fix OpenGL processing when activity is not active." into ics-mr1
-rwxr-xr-x | src/com/android/camera/panorama/PanoramaActivity.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java index a99e7be..bda0381 100755 --- a/src/com/android/camera/panorama/PanoramaActivity.java +++ b/src/com/android/camera/panorama/PanoramaActivity.java @@ -492,10 +492,16 @@ public class PanoramaActivity extends ActivityBase implements /* This function may be called by some random thread, * so let's be safe and use synchronize. No OpenGL calls can be done here. */ + // Frames might still be available after the activity is paused. If we call onFrameAvailable + // after pausing, the GL thread will crash. + if (mPausing) return; + // Updating the texture should be done in the GL thread which mMosaicView is attached. mMosaicView.queueEvent(new Runnable() { @Override public void run() { + // Check if the activity is paused here can speed up the onPause() process. + if (mPausing) return; mSurfaceTexture.updateTexImage(); mSurfaceTexture.getTransformMatrix(mTransformMatrix); } |