Backed out changeset 406908b6e015 (bug 1251390) for webgl failures. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 11 Mar 2016 12:37:23 +0100
changeset 288269 1992eff1a02d5cfc227c2045754a3ba48a13065c
parent 288268 04ba63cdb181cf7efba193c1455e3ab506a699cc
child 288270 3a4549c08a316ccc80258d59f42d7c2cf5da1648
push id30079
push userryanvm@gmail.com
push dateSat, 12 Mar 2016 20:24:19 +0000
treeherdermozilla-central@d1d47ba19ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1251390
milestone48.0a1
backs out406908b6e0157ae8a26aaaf518b3d445f0f86322
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
Backed out changeset 406908b6e015 (bug 1251390) for webgl failures. r=backout
dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
dom/canvas/WebGLTimerQuery.cpp
dom/canvas/WebGLTimerQuery.h
--- a/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
+++ b/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp
@@ -7,17 +7,16 @@
 #include "WebGLExtensions.h"
 
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "GLContext.h"
 #include "WebGLContext.h"
 #include "WebGLTimerQuery.h"
-#include "gfxPrefs.h"
 
 namespace mozilla {
 
 WebGLExtensionDisjointTimerQuery::WebGLExtensionDisjointTimerQuery(WebGLContext* webgl)
   : WebGLExtensionBase(webgl)
   , mActiveQuery(nullptr)
 {
   MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
@@ -113,17 +112,16 @@ WebGLExtensionDisjointTimerQuery::EndQue
 
   if (!mActiveQuery) {
     mContext->ErrorInvalidOperation("endQueryEXT: A query is not active.");
     return;
   }
 
   mContext->MakeContextCurrent();
   mContext->GL()->fEndQuery(target);
-  mActiveQuery->QueueAvailablity();
   mActiveQuery = nullptr;
 }
 
 void
 WebGLExtensionDisjointTimerQuery::QueryCounterEXT(WebGLTimerQuery* query,
                                                   GLenum target)
 {
   if (mIsLost)
@@ -218,18 +216,17 @@ WebGLExtensionDisjointTimerQuery::GetQue
     retval.set(JS::NumberValue(result));
     break;
   }
   case LOCAL_GL_QUERY_RESULT_AVAILABLE_EXT: {
     GLuint avail = 0;
     mContext->GL()->fGetQueryObjectuiv(query->mGLName,
                                        LOCAL_GL_QUERY_RESULT_AVAILABLE_EXT,
                                        &avail);
-    bool canBeAvailable = query->CanBeAvailable() || gfxPrefs::WebGLImmediateQueries();
-    retval.set(JS::BooleanValue(bool(avail) && canBeAvailable));
+    retval.set(JS::BooleanValue(bool(avail)));
     break;
   }
   default:
     mContext->ErrorInvalidEnumInfo("getQueryObjectEXT: Invalid query"
                                    " property.", pname);
     break;
   }
 }
--- a/dom/canvas/WebGLTimerQuery.cpp
+++ b/dom/canvas/WebGLTimerQuery.cpp
@@ -5,31 +5,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebGLTimerQuery.h"
 
 #include "GLContext.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "nsContentUtils.h"
 #include "WebGLContext.h"
-#include "nsThreadUtils.h"
 
 namespace mozilla {
 
 JSObject*
 WebGLTimerQuery::WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto)
 {
   return dom::WebGLTimerQueryEXTBinding::Wrap(cx, this, givenProto);
 }
 
 WebGLTimerQuery::WebGLTimerQuery(WebGLContext* webgl, GLuint name)
   : WebGLContextBoundObject(webgl)
   , mGLName(name)
   , mTarget(LOCAL_GL_NONE)
-  , mCanBeAvailable(false)
 {
 }
 
 WebGLTimerQuery::~WebGLTimerQuery()
 {
   DeleteOnce();
 }
 
@@ -50,21 +48,15 @@ WebGLTimerQuery::Delete()
 }
 
 WebGLContext*
 WebGLTimerQuery::GetParentObject() const
 {
   return mContext;
 }
 
-void
-WebGLTimerQuery::QueueAvailablity()
-{
-  RefPtr<WebGLTimerQuery> self = this;
-  NS_DispatchToCurrentThread(NS_NewRunnableFunction([self] { self->mCanBeAvailable = true; }));
-}
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLTimerQuery)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WebGLTimerQuery, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WebGLTimerQuery, Release)
 
 } // namespace mozilla
--- a/dom/canvas/WebGLTimerQuery.h
+++ b/dom/canvas/WebGLTimerQuery.h
@@ -19,18 +19,16 @@ class WebGLTimerQuery final
   , public WebGLContextBoundObject
 {
 public:
   static WebGLTimerQuery* Create(WebGLContext* webgl);
 
   void Delete();
 
   bool HasEverBeenBound() const { return mTarget != LOCAL_GL_NONE; }
-  bool CanBeAvailable() const { return mCanBeAvailable; }
-  void QueueAvailablity();
   GLenum Target() const { return mTarget; }
 
   WebGLContext* GetParentObject() const;
 
   // NS
   virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto) override;
 
   const GLenum mGLName;
@@ -38,16 +36,15 @@ public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLTimerQuery)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLTimerQuery)
 
 private:
   explicit WebGLTimerQuery(WebGLContext* webgl, GLuint name);
   ~WebGLTimerQuery();
 
   GLenum mTarget;
-  bool mCanBeAvailable;
 
   friend class WebGLExtensionDisjointTimerQuery;
 };
 
 } // namespace mozilla
 
 #endif // WEBGL_TIMER_QUERY_H_