Adding a full screen video sample plugin. Also cleaned up surface plugins to use the provided JavaVM.
diff --git a/samples/BrowserPlugin/jni/jni-bridge.cpp b/samples/BrowserPlugin/jni/jni-bridge.cpp
index 45ecd54..22e76da 100644
--- a/samples/BrowserPlugin/jni/jni-bridge.cpp
+++ b/samples/BrowserPlugin/jni/jni-bridge.cpp
@@ -35,12 +35,8 @@
static void surfaceCreated(JNIEnv* env, jobject thiz, jint npp, jobject surface) {
SurfaceSubPlugin* obj = getPluginObject(npp);
-
- //TODO why is this VM different from the one in NP_INIT...
- JavaVM* vm = NULL;
- env->GetJavaVM(&vm);
-
- obj->surfaceCreated(env, surface);
+ jobject globalSurface = env->NewGlobalRef(surface);
+ obj->surfaceCreated(globalSurface);
}
static void surfaceChanged(JNIEnv* env, jobject thiz, jint npp, jint format, jint width, jint height) {