Backout 7ddda33608c6 (bug 772672) due to robocop orange.
This commit is contained in:
@@ -1168,7 +1168,7 @@ AndroidBridge::CallEglCreateWindowSurface(void *dpy, void *config, AndroidGeckoS
|
||||
}
|
||||
|
||||
static AndroidGLController sController;
|
||||
static jobject sGLController;
|
||||
|
||||
void
|
||||
AndroidBridge::RegisterCompositor()
|
||||
{
|
||||
@@ -1181,14 +1181,11 @@ AndroidBridge::RegisterCompositor()
|
||||
|
||||
jmethodID registerCompositor = env->GetStaticMethodID(jLayerView, "registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;");
|
||||
|
||||
if (sGLController)
|
||||
env->DeleteGlobalRef(sGLController);
|
||||
|
||||
sGLController = env->NewGlobalRef(env->CallStaticObjectMethod(jLayerView, registerCompositor));
|
||||
jobject glController = env->CallStaticObjectMethod(jLayerView, registerCompositor);
|
||||
if (jniFrame.CheckForException())
|
||||
return;
|
||||
|
||||
sController.Acquire(env, sGLController);
|
||||
sController.Acquire(env, glController);
|
||||
sController.SetGLVersion(2);
|
||||
}
|
||||
|
||||
@@ -1199,20 +1196,6 @@ AndroidBridge::ProvideEGLSurface()
|
||||
return sController.ProvideEGLSurface();
|
||||
}
|
||||
|
||||
bool
|
||||
AndroidBridge::HaveValidSurface(JNIEnv* env) {
|
||||
AutoLocalJNIFrame jniFrame(env);
|
||||
if (!sGLController)
|
||||
return false;
|
||||
jclass gLControllerCls = env->FindClass("org/mozilla/gecko/gfx/GLController");
|
||||
if (!gLControllerCls)
|
||||
return false;
|
||||
jfieldID mSurfaceValidFld = env->GetFieldID(gLControllerCls, "mSurfaceValid", "Z");
|
||||
if (!mSurfaceValidFld)
|
||||
return false;
|
||||
return env->GetBooleanField(sGLController, mSurfaceValidFld);
|
||||
}
|
||||
|
||||
bool
|
||||
AndroidBridge::GetStaticIntField(const char *className, const char *fieldName, PRInt32* aInt, JNIEnv* env /* = nsnull */)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user