Bug 1308057 - GPU_DISJOINT is false unless we have the ext. - r=ethlin a=gchang
authorJeff Gilbert (:jgilbert) <jgilbert@mozilla.com>
Thu, 10 Nov 2016 17:49:44 -0800
changeset 352959 c978d78af5f686c3f47832141835e3f6344214a4
parent 352958 97822c800e0c05154ff64855102a171c5b7045af
child 352960 81743ff18b2ff5f3dd19f6b8d066cc69159da98e
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersethlin, gchang
bugs1308057
milestone52.0a2
Bug 1308057 - GPU_DISJOINT is false unless we have the ext. - r=ethlin a=gchang MozReview-Commit-ID: vvBJZV4DcW
dom/canvas/WebGLContextState.cpp
--- a/dom/canvas/WebGLContextState.cpp
+++ b/dom/canvas/WebGLContextState.cpp
@@ -276,19 +276,20 @@ WebGLContext::GetParameter(JSContext* cx
                 }
                 // TODO: JS doesn't support 64-bit integers. Be lossy and
                 // cast to double (53 bits)
                 return JS::NumberValue(val);
             }
 
         case LOCAL_GL_GPU_DISJOINT_EXT:
             {
-                MOZ_ASSERT(gl->IsExtensionSupported(gl::GLContext::EXT_disjoint_timer_query));
-                realGLboolean val = false;
-                gl->fGetBooleanv(pname, &val);
+                realGLboolean val = false; // Not disjoint by default.
+                if (gl->IsExtensionSupported(gl::GLContext::EXT_disjoint_timer_query)) {
+                    gl->fGetBooleanv(pname, &val);
+                }
                 return JS::BooleanValue(val);
             }
 
         default:
             break;
         }
     }