Bug 740303. Make sure we update the checkerboard layer. r=kats.
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 09 Apr 2012 10:59:36 -0400
changeset 94563 575db34e12396ab28b333a9d3df2d3dd9ca13530
parent 94562 74670610b9194aab1c5422a4cdcc00e7f255ccab
child 94564 147324800246e0e86db097b4fb0803c3422fef64
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs740303
milestone14.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 740303. Make sure we update the checkerboard layer. r=kats. Presumably this started happening after we stopped setting the checkerboard color all of the time.
mobile/android/base/gfx/LayerRenderer.java
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -412,33 +412,31 @@ public class LayerRenderer implements GL
                     mFrameRateLayer = TextLayer.create(frameRateLayerSize, "-- ms/--");
                     moveFrameRateLayer(mView.getWidth(), mView.getHeight());
                 }
                 mProfileRender = Log.isLoggable(PROFTAG, Log.DEBUG);
             }
         }).start();
     }
 
-    private void updateCheckerboardLayer(RenderContext renderContext) {
+    private void updateCheckerboardImage() {
         int checkerboardColor = mView.getController().getCheckerboardColor();
         boolean showChecks = mView.getController().checkerboardShouldShowChecks();
         if (checkerboardColor == mCheckerboardImage.getColor() &&
             showChecks == mCheckerboardImage.getShowChecks()) {
             return;
         }
 
         mCheckerboardLayer.beginTransaction();  // called on compositor thread
         try {
             mCheckerboardImage.update(showChecks, checkerboardColor);
             mCheckerboardLayer.invalidate();
         } finally {
             mCheckerboardLayer.endTransaction();
         }
-
-        mCheckerboardLayer.update(renderContext);   // called on compositor thread
     }
 
     /*
      * create a vertex shader type (GLES20.GL_VERTEX_SHADER)
      * or a fragment shader type (GLES20.GL_FRAGMENT_SHADER)
      */
     public static int loadShader(int type, String shaderCode) {
         int shader = GLES20.glCreateShader(type);
@@ -532,17 +530,18 @@ public class LayerRenderer implements GL
                 }
             }
             mLastPageContext = mPageContext;
 
             /* Update layers. */
             if (rootLayer != null) mUpdated &= rootLayer.update(mPageContext);  // called on compositor thread
             mUpdated &= mBackgroundLayer.update(mScreenContext);    // called on compositor thread
             mUpdated &= mShadowLayer.update(mPageContext);  // called on compositor thread
-            updateCheckerboardLayer(mScreenContext);
+            updateCheckerboardImage();
+            mUpdated &= mCheckerboardLayer.update(mScreenContext);   // called on compositor thread
             if (mFrameRateLayer != null) mUpdated &= mFrameRateLayer.update(mScreenContext); // called on compositor thread
             mUpdated &= mVertScrollLayer.update(mPageContext);  // called on compositor thread
             mUpdated &= mHorizScrollLayer.update(mPageContext); // called on compositor thread
 
             for (Layer layer : mExtraLayers)
                 mUpdated &= layer.update(mPageContext); // called on compositor thread
 
             GLES20.glDisable(GLES20.GL_SCISSOR_TEST);