Bug 1030523 - Back out cset 038356d89dc2 so we properly initialize the compositor when we get a surface. r=snorp
--- a/mobile/android/base/gfx/GLController.java
+++ b/mobile/android/base/gfx/GLController.java
@@ -196,20 +196,16 @@ public class GLController {
// is blocked on the gecko sync event in updateCompositor() above
mCompositorCreated = true;
}
public boolean isServerSurfaceValid() {
return mServerSurfaceValid;
}
- public boolean isCompositorCreated() {
- return mCompositorCreated;
- }
-
private void initEGL() {
if (mEGL != null) {
return;
}
// This join() should not be necessary, but makes this code a bit easier to think about.
// The EGLPreloadingThread should long be done by now, and even if it's not,
// it shouldn't be a problem to be initalizing EGL from two different threads.
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -471,23 +471,18 @@ public class LayerView extends FrameLayo
* Gecko is also sent the new window size, and this will likely cause an
* extra draw a few frames later, after it's re-rendered and caught up.
*
* In the case that there is no valid GL surface (for example, when
* resuming, or when coming back from the awesomescreen), or we're using a
* TextureView instead of a SurfaceView, the first phase is skipped.
*/
private void onSizeChanged(int width, int height) {
- if (!mGLController.isCompositorCreated()) {
- return;
- }
-
- surfaceChanged(width, height);
-
- if (mSurfaceView == null) {
+ if (!mGLController.isServerSurfaceValid() || mSurfaceView == null) {
+ surfaceChanged(width, height);
return;
}
if (mListener != null) {
mListener.sizeChanged(width, height);
}
if (mOverscroll != null) {