Backed out changeset 406908b6e015 (bug 1251390) for webgl failures. r=backout

This commit is contained in:
Sebastian Hengst 2016-03-11 12:37:23 +01:00
parent 4da961fb99
commit 337c4a31c1
3 changed files with 1 additions and 15 deletions

View File

@ -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:

View File

@ -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<WebGLTimerQuery> self = this;
NS_DispatchToCurrentThread(NS_NewRunnableFunction([self] { self->mCanBeAvailable = true; }));
}
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLTimerQuery)

View File

@ -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;
};