r?jrmuizel - Only check robustness if it's supported. draft
authorJeff Gilbert <jdashg@gmail.com>
Fri, 20 May 2016 17:39:30 -0700
changeset 369263 69e965dee11a3179dbcc2fd348126ac06a4c81f3
parent 369262 1e37e22155f1c334145ad2546eaa69b95642f2ca
child 521532 164e070c2ef4833788d9ddcf221193478aafd3be
push id18816
push userjgilbert@mozilla.com
push dateSat, 21 May 2016 00:54:33 +0000
reviewersjrmuizel
milestone49.0a1
r?jrmuizel - Only check robustness if it's supported. From 15596597a92b139c93fa319433f72d1d3349ee4a Mon Sep 17 00:00:00 2001 --- gfx/gl/GLContext.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) MozReview-Commit-ID: A1azNo7Ioy3
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1085,40 +1085,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 } },