author | Sebastian Hengst <archaeopteryx@coole-files.de> |
Fri, 11 Mar 2016 12:37:23 +0100 | |
changeset 288188 | 1992eff1a02d5cfc227c2045754a3ba48a13065c |
parent 288187 | 04ba63cdb181cf7efba193c1455e3ab506a699cc |
child 288189 | 3a4549c08a316ccc80258d59f42d7c2cf5da1648 |
push id | 73351 |
push user | archaeopteryx@coole-files.de |
push date | Fri, 11 Mar 2016 11:37:44 +0000 |
treeherder | mozilla-inbound@1992eff1a02d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | backout |
bugs | 1251390 |
milestone | 48.0a1 |
backs out | 406908b6e0157ae8a26aaaf518b3d445f0f86322 |
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
|
--- 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_