diff options
author | Grace Kloba <klobag@google.com> | 2011-06-22 00:56:54 -0700 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2011-06-22 00:56:54 -0700 |
commit | 925bcaabde5a21687b51caa7ab329310a819f068 (patch) | |
tree | 9d530d0cf7968028edf8b979a35f8a4cfd809386 /graphics/java | |
parent | 87b7f805b94f5df53343264509f6d606d96dfb05 (diff) | |
download | frameworks_base-925bcaabde5a21687b51caa7ab329310a819f068.zip frameworks_base-925bcaabde5a21687b51caa7ab329310a819f068.tar.gz frameworks_base-925bcaabde5a21687b51caa7ab329310a819f068.tar.bz2 |
Fix the issue where onFrameAvailable is not triggered if SurfaceTexture is in sync mode.
If there is more frame after updateTexImage, trigger the listener again.
Change-Id: I1415ae9a914cc8bb139cb369464b1f6a2aa24058
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/SurfaceTexture.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java index 6c7341f..9e498d0 100644 --- a/graphics/java/android/graphics/SurfaceTexture.java +++ b/graphics/java/android/graphics/SurfaceTexture.java @@ -131,6 +131,10 @@ public class SurfaceTexture { */ public void updateTexImage() { nativeUpdateTexImage(); + if (nativeGetQueuedCount() > 0) { + Message m = mEventHandler.obtainMessage(); + mEventHandler.sendMessage(m); + } } /** @@ -215,6 +219,7 @@ public class SurfaceTexture { private native long nativeGetTimestamp(); private native void nativeSetDefaultBufferSize(int width, int height); private native void nativeUpdateTexImage(); + private native int nativeGetQueuedCount(); /* * We use a class initializer to allow the native code to cache some |