Bug 738188. Avoid crashing by disabling the screenshot drawing code. r=kats
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 27 Mar 2012 21:43:56 -0400
changeset 93803 72a3e44395b23a65266323155b4dba47b063cdb8
parent 93802 f892c7884b1ecc9f81793c08eeda7a8f67af0448
child 93804 8c11ef0773bb8b64e0b03a3c57f714aafb391f58
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
bugs738188, 739867
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 738188. Avoid crashing by disabling the screenshot drawing code. r=kats The crashes seem to be caused by SurfaceChange breaking any future onDrawFrame calls. We don't seem to handle renewing the context at all. I added mController.disposeGLContext(); mController.initGLContext(); to the SizeChange::run() but that doesn't seem to fix it. Bug 739867 will add this support back.
mobile/android/base/gfx/LayerRenderer.java
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -261,26 +261,29 @@ public class LayerRenderer implements GL
             mExtraLayers.remove(layer);
         }
     }
 
     /**
      * Called whenever a new frame is about to be drawn.
      */
     public void onDrawFrame(GL10 gl) {
+	/* This code is causing crashes when the surface changes. (bug 738188)
+	 * I'm not sure if it actually works, so I'm disabling it now to avoid the crash.
         RenderContext pageContext = createPageContext(mView.getController().getViewportMetrics());
         RenderContext screenContext = createScreenContext();
         Frame frame = createFrame(pageContext, screenContext);
         synchronized (mView.getController()) {
             frame.beginDrawing();
             frame.drawBackground();
             frame.drawRootLayer();
             frame.drawForeground();
             frame.endDrawing();
         }
+	*/
     }
 
     private void printCheckerboardStats() {
         Log.d(PROFTAG, "Frames rendered over last 1000ms: " + mCompleteFramesRendered + "/" + mFramesRendered);
         mFramesRendered = 0;
         mCompleteFramesRendered = 0;
     }