Bug 844275 - Make the GLController a singleton instance. r=Cwiiis

This commit is contained in:
Kartikaya Gupta
2013-02-28 13:28:23 -05:00
parent db14d0f886
commit dc5153f1d7
6 changed files with 22 additions and 33 deletions

View File

@@ -28,7 +28,6 @@ void AndroidEGLObject::Init(JNIEnv* aJEnv) {
jmethodID AndroidGLController::jWaitForValidSurfaceMethod = 0;
jmethodID AndroidGLController::jProvideEGLSurfaceMethod = 0;
jmethodID AndroidGLController::jResumeCompositorIfValidMethod = 0;
void
AndroidGLController::Init(JNIEnv* aJEnv)
@@ -37,7 +36,6 @@ AndroidGLController::Init(JNIEnv* aJEnv)
jProvideEGLSurfaceMethod = aJEnv->GetMethodID(jClass, "provideEGLSurface",
"()Ljavax/microedition/khronos/egl/EGLSurface;");
jResumeCompositorIfValidMethod = aJEnv->GetMethodID(jClass, "resumeCompositorIfValid", "()V");
jWaitForValidSurfaceMethod = aJEnv->GetMethodID(jClass, "waitForValidSurface", "()V");
}
@@ -49,16 +47,6 @@ AndroidGLController::Acquire(JNIEnv* aJEnv, jobject aJObj)
mJObj = aJEnv->NewGlobalRef(aJObj);
}
void
AndroidGLController::Reacquire(JNIEnv *aJEnv, jobject aJObj)
{
aJEnv->DeleteGlobalRef(mJObj);
mJObj = aJEnv->NewGlobalRef(aJObj);
AutoLocalJNIFrame jniFrame(aJEnv, 0);
aJEnv->CallVoidMethod(mJObj, jResumeCompositorIfValidMethod);
}
EGLSurface
AndroidGLController::ProvideEGLSurface()
{