Bug 732765 - Fail gracefully when we lack GL functionality - r=bjacob
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 29 Mar 2012 13:47:20 -0700
changeset 90643 70dda949e11d9abad418cbf6d8984d288baef6dd
parent 90642 76f8c248cb14e88912e7525eaeeef3fdd5fe2407
child 90644 11ef97686043964c0c0305f64fefddd57cf772af
push id7772
push userjgilbert@mozilla.com
push dateThu, 29 Mar 2012 20:47:50 +0000
treeherdermozilla-inbound@70dda949e11d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs732765
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 732765 - Fail gracefully when we lack GL functionality - r=bjacob
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -274,31 +274,31 @@ GLContext::InitWithPrefix(const char *pr
             SymLoadStruct symbols_ES2[] = {
                 { (PRFuncPtr*) &mSymbols.fGetShaderPrecisionFormat, { "GetShaderPrecisionFormat", NULL } },
                 { (PRFuncPtr*) &mSymbols.fClearDepthf, { "ClearDepthf", NULL } },
                 { (PRFuncPtr*) &mSymbols.fDepthRangef, { "DepthRangef", NULL } },
                 { NULL, { NULL } },
             };
 
             if (!LoadSymbols(&symbols_ES2[0], trygl, prefix)) {
-                NS_RUNTIMEABORT("OpenGL ES 2.0 supported, but symbols could not be loaded.");
+                NS_ERROR("OpenGL ES 2.0 supported, but symbols could not be loaded.");
                 mInitialized = false;
             }
         } else {
             SymLoadStruct symbols_desktop[] = {
                 { (PRFuncPtr*) &mSymbols.fClearDepth, { "ClearDepth", NULL } },
                 { (PRFuncPtr*) &mSymbols.fDepthRange, { "DepthRange", NULL } },
                 { (PRFuncPtr*) &mSymbols.fReadBuffer, { "ReadBuffer", NULL } },
                 { (PRFuncPtr*) &mSymbols.fMapBuffer, { "MapBuffer", NULL } },
                 { (PRFuncPtr*) &mSymbols.fUnmapBuffer, { "UnmapBuffer", NULL } },
                 { NULL, { NULL } },
             };
 
             if (!LoadSymbols(&symbols_desktop[0], trygl, prefix)) {
-                NS_RUNTIMEABORT("Desktop symbols failed to load.");
+                NS_ERROR("Desktop symbols failed to load.");
                 mInitialized = false;
             }
         }
     }
 
     const char *glVendorString;
     const char *glRendererString;
 
@@ -370,57 +370,57 @@ GLContext::InitWithPrefix(const char *pr
         if (SupportsRobustness()) {
             if (IsExtensionSupported(ARB_robustness)) {
                 SymLoadStruct robustnessSymbols[] = {
                     { (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusARB", NULL } },
                     { NULL, { NULL } },
                 };
 
                 if (!LoadSymbols(&robustnessSymbols[0], trygl, prefix)) {
-                    NS_RUNTIMEABORT("GL supports ARB_robustness without supplying GetGraphicsResetStatusARB.");
+                    NS_ERROR("GL supports ARB_robustness without supplying GetGraphicsResetStatusARB.");
                     mInitialized = false;
                 } else {
                     mHasRobustness = true;
                 }
             } else if (IsExtensionSupported(EXT_robustness)) {
                 SymLoadStruct robustnessSymbols[] = {
                     { (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusEXT", NULL } },
                     { NULL, { NULL } },
                 };
 
                 if (!LoadSymbols(&robustnessSymbols[0], trygl, prefix)) {
-                    NS_RUNTIMEABORT("GL supports EGL_robustness without supplying GetGraphicsResetStatusEXT.");
+                    NS_ERROR("GL supports EGL_robustness without supplying GetGraphicsResetStatusEXT.");
                     mInitialized = false;
                 } else {
                     mHasRobustness = true;
                 }
             }
         }
 
         // Check for aux symbols based on extensions
         if (IsExtensionSupported(GLContext::ANGLE_framebuffer_blit) ||
             IsExtensionSupported(GLContext::EXT_framebuffer_blit)) {
             SymLoadStruct auxSymbols[] = {
                     { (PRFuncPtr*) &mSymbols.fBlitFramebuffer, { "BlitFramebuffer", "BlitFramebufferEXT", "BlitFramebufferANGLE", NULL } },
                     { NULL, { NULL } },
             };
             if (!LoadSymbols(&auxSymbols[0], trygl, prefix)) {
-                NS_RUNTIMEABORT("GL supports framebuffer_blit without supplying glBlitFramebuffer");
+                NS_ERROR("GL supports framebuffer_blit without supplying glBlitFramebuffer");
                 mInitialized = false;
             }
         }
 
         if (IsExtensionSupported(GLContext::ANGLE_framebuffer_multisample) ||
             IsExtensionSupported(GLContext::EXT_framebuffer_multisample)) {
             SymLoadStruct auxSymbols[] = {
                     { (PRFuncPtr*) &mSymbols.fRenderbufferStorageMultisample, { "RenderbufferStorageMultisample", "RenderbufferStorageMultisampleEXT", "RenderbufferStorageMultisampleANGLE", NULL } },
                     { NULL, { NULL } },
             };
             if (!LoadSymbols(&auxSymbols[0], trygl, prefix)) {
-                NS_RUNTIMEABORT("GL supports framebuffer_multisample without supplying glRenderbufferStorageMultisample");
+                NS_ERROR("GL supports framebuffer_multisample without supplying glRenderbufferStorageMultisample");
                 mInitialized = false;
             }
         }
        
         // Load developer symbols, don't fail if we can't find them.
         SymLoadStruct auxSymbols[] = {
                 { (PRFuncPtr*) &mSymbols.fGetTexImage, { "GetTexImage", NULL } },
                 { (PRFuncPtr*) &mSymbols.fGetTexLevelParameteriv, { "GetTexLevelParameteriv", NULL } },