Bug 1259449 - Require GLFeature::sync for WebGL's disjoint_timer_query. - r=jrmuizel
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 29 Mar 2016 17:32:45 -0700
changeset 291007 26a75fc6f8c74255ad350f62f3dd122e89c8b148
parent 291006 cd2868983231ad1dcf5c4c9e12d0f03b12cbf950
child 291008 7431c1300d28ef1e07f077a92c5db861f9717f72
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1259449
milestone48.0a1
Bug 1259449 - Require GLFeature::sync for WebGL's disjoint_timer_query. - r=jrmuizel
dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
dom/canvas/test/webgl-mochitest.ini
--- a/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
+++ b/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
@@ -237,15 +237,18 @@ WebGLExtensionDisjointTimerQuery::GetQue
 
 bool
 WebGLExtensionDisjointTimerQuery::IsSupported(const WebGLContext* webgl)
 {
   webgl->MakeContextCurrent();
   gl::GLContext* gl = webgl->GL();
   return gl->IsSupported(gl::GLFeature::query_objects) &&
          gl->IsSupported(gl::GLFeature::get_query_object_i64v) &&
-         gl->IsSupported(gl::GLFeature::query_counter); // provides GL_TIMESTAMP
+         gl->IsSupported(gl::GLFeature::query_counter) && // provides GL_TIMESTAMP
+         gl->IsSupported(gl::GLFeature::sync); // provides glGetInteger64v
+  // 'sync' provides glGetInteger64v either by supporting ARB_sync, GL3+, or GLES3+.
+  // Since there are no differences between support for glGetInteger64v and support for
+  // 'sync', we just piggy-back off of 'sync'.
 }
 
-
 IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDisjointTimerQuery, EXT_disjoint_timer_query)
 
 } // namespace mozilla
--- a/dom/canvas/test/webgl-mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest.ini
@@ -10,17 +10,17 @@ support-files =
 
 [webgl-mochitest/ensure-exts/test_ANGLE_instanced_arrays.html]
 fail-if = (os == 'android') || (os == 'mac' && os_version == '10.6')
 [webgl-mochitest/ensure-exts/test_EXT_blend_minmax.html]
 fail-if = (os == 'android')
 [webgl-mochitest/ensure-exts/test_EXT_color_buffer_half_float.html]
 fail-if = (os == 'android')
 [webgl-mochitest/ensure-exts/test_EXT_disjoint_timer_query.html]
-fail-if = (os == 'android') || (os == 'mac') || (os == 'win' && (os_version == '5.1' || os_version == '6.1'))
+fail-if = (os == 'android') || (os == 'mac') || (os == 'win')
 [webgl-mochitest/ensure-exts/test_EXT_frag_depth.html]
 fail-if = (os == 'android')
 [webgl-mochitest/ensure-exts/test_EXT_sRGB.html]
 fail-if = (os == 'android') || (os == 'mac' && os_version == '10.6') || (os == 'win')
 [webgl-mochitest/ensure-exts/test_EXT_shader_texture_lod.html]
 fail-if = (os == 'android') || (os == 'linux') || (os == 'mac')
 [webgl-mochitest/ensure-exts/test_EXT_texture_filter_anisotropic.html]
 fail-if = (os == 'android') || (os == 'linux')