Bug 787017. Die more verbosely on Android during Layers init. r=bjacob
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 11 Feb 2013 15:56:26 -0500
changeset 131426 24f879564f43a18c5faf35eceecb53196a28011f
parent 131425 32c248cf74746866b284765a64b80bae341c7ccd
child 131427 c8135b361176680c2e883e6aee69c37958bdae5b
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs787017
milestone21.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 787017. Die more verbosely on Android during Layers init. r=bjacob This might give us some more information on what's happening.
gfx/layers/opengl/LayerManagerOGL.cpp
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -516,16 +516,19 @@ LayerManagerOGL::Initialize(nsRefPtr<GLC
 
   mPrograms.AppendElements(NumProgramTypes);
   for (int type = 0; type < NumProgramTypes; ++type) {
     AddPrograms(static_cast<ShaderProgramType>(type));
   }
 
   // initialise a common shader to check that we can actually compile a shader
   if (!mPrograms[gl::RGBALayerProgramType].mVariations[MaskNone]->Initialize()) {
+#ifdef MOZ_WIDGET_ANDROID
+    NS_RUNTIMEABORT("Shader initialization failed");
+#endif
     return false;
   }
 
 
   mGLContext->fGenFramebuffers(1, &mBackBufferFBO);
 
   if (mGLContext->WorkAroundDriverBugs()) {
 
@@ -586,16 +589,19 @@ LayerManagerOGL::Initialize(nsRefPtr<GLC
 
       // We weren't succesful with this texture, so we don't need it
       // any more.
       mGLContext->fDeleteTextures(1, &mBackBufferTexture);
     }
 
     if (mFBOTextureTarget == LOCAL_GL_NONE) {
       /* Unable to find a texture target that works with FBOs and NPOT textures */
+#ifdef MOZ_WIDGET_ANDROID
+      NS_RUNTIMEABORT("No texture target");
+#endif
       return false;
     }
   } else {
     // not trying to work around driver bugs, so TEXTURE_2D should just work
     mFBOTextureTarget = LOCAL_GL_TEXTURE_2D;
   }
 
   // back to default framebuffer, to avoid confusion
@@ -603,16 +609,19 @@ LayerManagerOGL::Initialize(nsRefPtr<GLC
 
   if (mFBOTextureTarget == LOCAL_GL_TEXTURE_RECTANGLE_ARB) {
     /* If we're using TEXTURE_RECTANGLE, then we must have the ARB
      * extension -- the EXT variant does not provide support for
      * texture rectangle access inside GLSL (sampler2DRect,
      * texture2DRect).
      */
     if (!mGLContext->IsExtensionSupported(gl::GLContext::ARB_texture_rectangle))
+#ifdef MOZ_WIDGET_ANDROID
+      NS_RUNTIMEABORT("No texture rectangle");
+#endif
       return false;
   }
 
   // If we're double-buffered, we don't need this fbo anymore.
   if (mGLContext->IsDoubleBuffered()) {
     mGLContext->fDeleteFramebuffers(1, &mBackBufferFBO);
     mBackBufferFBO = 0;
   }