Loading core/jni/android/graphics/SurfaceTexture.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -212,6 +212,12 @@ static jlong SurfaceTexture_getTimestamp(JNIEnv* env, jobject thiz) return surfaceTexture->getTimestamp(); } static jint SurfaceTexture_getQueuedCount(JNIEnv* env, jobject thiz) { sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); return surfaceTexture->getQueuedCount(); } // ---------------------------------------------------------------------------- static JNINativeMethod gSurfaceTextureMethods[] = { Loading @@ -221,7 +227,8 @@ static JNINativeMethod gSurfaceTextureMethods[] = { {"nativeSetDefaultBufferSize", "(II)V", (void*)SurfaceTexture_setDefaultBufferSize }, {"nativeUpdateTexImage", "()V", (void*)SurfaceTexture_updateTexImage }, {"nativeGetTransformMatrix", "([F)V", (void*)SurfaceTexture_getTransformMatrix }, {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp } {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp }, {"nativeGetQueuedCount", "()I", (void*)SurfaceTexture_getQueuedCount } }; int register_android_graphics_SurfaceTexture(JNIEnv* env) Loading graphics/java/android/graphics/SurfaceTexture.java +5 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,10 @@ public class SurfaceTexture { */ public void updateTexImage() { nativeUpdateTexImage(); if (nativeGetQueuedCount() > 0) { Message m = mEventHandler.obtainMessage(); mEventHandler.sendMessage(m); } } /** Loading Loading @@ -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 Loading Loading
core/jni/android/graphics/SurfaceTexture.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -212,6 +212,12 @@ static jlong SurfaceTexture_getTimestamp(JNIEnv* env, jobject thiz) return surfaceTexture->getTimestamp(); } static jint SurfaceTexture_getQueuedCount(JNIEnv* env, jobject thiz) { sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); return surfaceTexture->getQueuedCount(); } // ---------------------------------------------------------------------------- static JNINativeMethod gSurfaceTextureMethods[] = { Loading @@ -221,7 +227,8 @@ static JNINativeMethod gSurfaceTextureMethods[] = { {"nativeSetDefaultBufferSize", "(II)V", (void*)SurfaceTexture_setDefaultBufferSize }, {"nativeUpdateTexImage", "()V", (void*)SurfaceTexture_updateTexImage }, {"nativeGetTransformMatrix", "([F)V", (void*)SurfaceTexture_getTransformMatrix }, {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp } {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp }, {"nativeGetQueuedCount", "()I", (void*)SurfaceTexture_getQueuedCount } }; int register_android_graphics_SurfaceTexture(JNIEnv* env) Loading
graphics/java/android/graphics/SurfaceTexture.java +5 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,10 @@ public class SurfaceTexture { */ public void updateTexImage() { nativeUpdateTexImage(); if (nativeGetQueuedCount() > 0) { Message m = mEventHandler.obtainMessage(); mEventHandler.sendMessage(m); } } /** Loading Loading @@ -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 Loading