diff --git a/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp b/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp index 54c367583d83..fd3112c254a1 100644 --- a/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp +++ b/dom/canvas/WebGLExtensionDisjointTimerQuery.cpp @@ -12,7 +12,6 @@ #include "GLContext.h" #include "WebGLContext.h" #include "WebGLTimerQuery.h" -#include "gfxPrefs.h" namespace mozilla { @@ -118,7 +117,6 @@ WebGLExtensionDisjointTimerQuery::EndQueryEXT(GLenum target) mContext->MakeContextCurrent(); mContext->GL()->fEndQuery(target); - mActiveQuery->QueueAvailablity(); mActiveQuery = nullptr; } @@ -223,8 +221,7 @@ WebGLExtensionDisjointTimerQuery::GetQueryObjectEXT(JSContext* cx, 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: diff --git a/dom/canvas/WebGLTimerQuery.cpp b/dom/canvas/WebGLTimerQuery.cpp index 77c5c71638cb..5bdc1648d348 100644 --- a/dom/canvas/WebGLTimerQuery.cpp +++ b/dom/canvas/WebGLTimerQuery.cpp @@ -10,7 +10,6 @@ #include "mozilla/dom/WebGLRenderingContextBinding.h" #include "nsContentUtils.h" #include "WebGLContext.h" -#include "nsThreadUtils.h" namespace mozilla { @@ -24,7 +23,6 @@ WebGLTimerQuery::WebGLTimerQuery(WebGLContext* webgl, GLuint name) : WebGLContextBoundObject(webgl) , mGLName(name) , mTarget(LOCAL_GL_NONE) - , mCanBeAvailable(false) { } @@ -55,12 +53,6 @@ WebGLTimerQuery::GetParentObject() const return mContext; } -void -WebGLTimerQuery::QueueAvailablity() -{ - RefPtr self = this; - NS_DispatchToCurrentThread(NS_NewRunnableFunction([self] { self->mCanBeAvailable = true; })); -} NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLTimerQuery) diff --git a/dom/canvas/WebGLTimerQuery.h b/dom/canvas/WebGLTimerQuery.h index 2f05bda36e67..681adc337925 100644 --- a/dom/canvas/WebGLTimerQuery.h +++ b/dom/canvas/WebGLTimerQuery.h @@ -24,8 +24,6 @@ public: 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; @@ -43,7 +41,6 @@ private: ~WebGLTimerQuery(); GLenum mTarget; - bool mCanBeAvailable; friend class WebGLExtensionDisjointTimerQuery; };