From 0c9f6e1a956bda99a2f6e467ddbd8c971fc7b345 Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Tue, 29 Mar 2016 17:32:45 -0700 Subject: [PATCH] Bug 1259449 - Require GLFeature::sync for WebGL's disjoint_timer_query. - r=jrmuizel --- dom/canvas/WebGLExtensionDisjointTimerQuery.cpp | 7 +++++-- dom/canvas/test/webgl-mochitest.ini | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp b/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp index 3973442c4a26..81cc050c037f 100644 --- a/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp +++ b/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp @@ -242,10 +242,13 @@ WebGLExtensionDisjointTimerQuery::IsSupported(const WebGLContext* webgl) 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 diff --git a/dom/canvas/test/webgl-mochitest.ini b/dom/canvas/test/webgl-mochitest.ini index be3e5ed24d4d..55eb9f547f7e 100644 --- a/dom/canvas/test/webgl-mochitest.ini +++ b/dom/canvas/test/webgl-mochitest.ini @@ -15,7 +15,7 @@ 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]