Bug 1267879 - Only check robustness if it's supported. - r=jrmuizel
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 10 Jun 2016 17:44:49 -0700
changeset 303435 b2272d35d5f8
parent 303434 bba7d02cdb8c
child 303436 b0383b457801
push id30388
push usercbook@mozilla.com
push dateSat, 02 Jul 2016 09:15:23 +0000
treeherdermozilla-central@39dffbba7642 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1267879
milestone50.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 1267879 - Only check robustness if it's supported. - r=jrmuizel MozReview-Commit-ID: 4RNjnWFccID
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1111,40 +1111,42 @@ GLContext::LoadMoreSymbols(const char* p
                                                               const SymLoadStruct* extList,
                                                               GLFeature feature)
     {
         const bool useCore = this->IsFeatureProvidedByCoreSymbols(feature);
         const auto list = useCore ? coreList : extList;
         return fnLoadForFeature(list, feature);
     };
 
-    bool hasRobustness = false;
-    if (SupportsRobustness()) {
+    if (IsSupported(GLFeature::robustness)) {
+        bool hasRobustness = true;
+
         if (IsExtensionSupported(ARB_robustness)) {
             const SymLoadStruct symbols[] = {
                 { (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusARB", nullptr } },
                 END_SYMBOLS
             };
-            if (fnLoadForExt(symbols, ARB_robustness)) {
-                hasRobustness = true;
+            if (!fnLoadForExt(symbols, ARB_robustness)) {
+                hasRobustness = false;
             }
         }
 
         if (!hasRobustness && IsExtensionSupported(EXT_robustness)) {
             const SymLoadStruct symbols[] = {
                 { (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusEXT", nullptr } },
                 END_SYMBOLS
             };
-            if (fnLoadForExt(symbols, EXT_robustness)) {
-                hasRobustness = true;
+            if (!fnLoadForExt(symbols, EXT_robustness)) {
+                hasRobustness = false;
             }
         }
-    }
-    if (!hasRobustness) {
-        MarkUnsupported(GLFeature::robustness);
+
+        if (!hasRobustness) {
+            MarkUnsupported(GLFeature::robustness);
+        }
     }
 
     if (IsSupported(GLFeature::sync)) {
         const SymLoadStruct symbols[] = {
             { (PRFuncPtr*) &mSymbols.fFenceSync,      { "FenceSync",      nullptr } },
             { (PRFuncPtr*) &mSymbols.fIsSync,         { "IsSync",         nullptr } },
             { (PRFuncPtr*) &mSymbols.fDeleteSync,     { "DeleteSync",     nullptr } },
             { (PRFuncPtr*) &mSymbols.fClientWaitSync, { "ClientWaitSync", nullptr } },