diff options
Diffstat (limited to 'core/jni/android_view_ThreadedRenderer.cpp')
-rw-r--r-- | core/jni/android_view_ThreadedRenderer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp index 8e121de..e86a2d4 100644 --- a/core/jni/android_view_ThreadedRenderer.cpp +++ b/core/jni/android_view_ThreadedRenderer.cpp @@ -131,6 +131,13 @@ static void android_view_ThreadedRenderer_detachFunctor(JNIEnv* env, jobject cla proxy->detachFunctor(functor); } +static void android_view_ThreadedRenderer_runWithGlContext(JNIEnv* env, jobject clazz, + jlong proxyPtr, jobject jrunnable) { + RenderProxy* proxy = reinterpret_cast<RenderProxy*>( proxyPtr); + RenderTask* task = new JavaTask(env, jrunnable); + proxy->runWithGlContext(task); +} + #endif // ---------------------------------------------------------------------------- @@ -151,6 +158,7 @@ static JNINativeMethod gMethods[] = { { "nDestroyCanvas", "(J)V", (void*) android_view_ThreadedRenderer_destroyCanvas}, { "nAttachFunctor", "(JJ)V", (void*) android_view_ThreadedRenderer_attachFunctor}, { "nDetachFunctor", "(JJ)V", (void*) android_view_ThreadedRenderer_detachFunctor}, + { "nRunWithGlContext", "(JLjava/lang/Runnable;)V", (void*) android_view_ThreadedRenderer_runWithGlContext }, #endif }; |