mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
Backout 7ddda33608c6 (bug 772672) due to robocop orange.
This commit is contained in:
1 parent
ad9c6c9765
commit
0af2df084e
3 files changed
+4
-28
No files matched your search
@@ -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 */)
|
||||
{
|
||||
|
||||
@@ -263,8 +263,6 @@ public:
|
||||
void RegisterCompositor();
|
||||
EGLSurface ProvideEGLSurface();
|
||||
|
||||
static bool HaveValidSurface(JNIEnv* env);
|
||||
|
||||
bool GetStaticStringField(const char *classID, const char *field, nsAString &result, JNIEnv* env = nsnull);
|
||||
|
||||
bool GetStaticIntField(const char *className, const char *fieldName, PRInt32* aInt, JNIEnv* env = nsnull);
|
||||
|
||||
@@ -1079,7 +1079,7 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
||||
JNIEnv *env = AndroidBridge::GetJNIEnv();
|
||||
if (!env)
|
||||
return;
|
||||
AutoLocalJNIFrame jniFrame(env);
|
||||
AutoLocalJNIFrame jniFrame;
|
||||
|
||||
#ifdef MOZ_JAVA_COMPOSITOR
|
||||
// We're paused, or we haven't been given a window-size yet, so do nothing
|
||||
@@ -1087,11 +1087,6 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mLayerManager) {
|
||||
if (!AndroidBridge::HaveValidSurface(env))
|
||||
return;
|
||||
}
|
||||
|
||||
layers::renderTraceEventStart("Get surface", "424545");
|
||||
static unsigned char bits2[32 * 32 * 2];
|
||||
nsRefPtr<gfxImageSurface> targetSurface =
|
||||
|
||||
Reference in new issue
Block a user