Bug 780699 - Prevent possible deadlock by reducing the scope of a synchronized block in GLController. r=ajuma

This commit is contained in:
Kartikaya Gupta 2012-08-08 11:37:46 -04:00
parent 9636508719
commit c0d9057cff

View File

@ -72,10 +72,13 @@ public class GLController {
}
// This function is invoked by JNI
public synchronized void resumeCompositorIfValid() {
if (mSurfaceValid) {
mView.getListener().compositionResumeRequested(mWidth, mHeight);
public void resumeCompositorIfValid() {
synchronized (this) {
if (!mSurfaceValid) {
return;
}
}
mView.getListener().compositionResumeRequested(mWidth, mHeight);
}
// Wait until we are allowed to use EGL functions on the Surface backing