Bug 1030523 - Back out cset 038356d89dc2 so we properly initialize the compositor when we get a surface. r=snorp
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 14 Oct 2014 14:52:05 -0400
changeset 210318 7246195fb751da0975f4a5abff617ff42e2ba712
parent 210317 1a5153ae014fcc6025e11e38bd6628df1c5d26b3
child 210319 c76eb2abb768775a1300591b6fd18f38f65ca1b3
child 210412 cb55300789e1dd8aea8e61a6d7e22c64299f06ed
push id27650
push userkwierso@gmail.com
push dateTue, 14 Oct 2014 23:59:16 +0000
treeherdermozilla-central@c76eb2abb768 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1030523
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1030523 - Back out cset 038356d89dc2 so we properly initialize the compositor when we get a surface. r=snorp
mobile/android/base/gfx/GLController.java
mobile/android/base/gfx/LayerView.java
--- 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) {