mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-19 10:53:11 +09:00
Use WeakPtr for extension parent pointer.
This commit is contained in:
parent
a10e2214ee
commit
08ccf18274
8 changed files with 55 additions and 33 deletions
|
|
@ -40,8 +40,10 @@ void
|
|||
WebGLExtensionDisjointTimerQuery::DeleteQueryEXT(WebGLQuery* query) const
|
||||
{
|
||||
const char funcName[] = "deleteQueryEXT";
|
||||
if (mIsLost)
|
||||
return;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
mContext->DeleteQuery(query, funcName);
|
||||
}
|
||||
|
|
@ -50,8 +52,10 @@ bool
|
|||
WebGLExtensionDisjointTimerQuery::IsQueryEXT(const WebGLQuery* query) const
|
||||
{
|
||||
const char funcName[] = "isQueryEXT";
|
||||
if (mIsLost)
|
||||
return false;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return mContext->IsQuery(query, funcName);
|
||||
}
|
||||
|
|
@ -60,8 +64,10 @@ void
|
|||
WebGLExtensionDisjointTimerQuery::BeginQueryEXT(GLenum target, WebGLQuery& query) const
|
||||
{
|
||||
const char funcName[] = "beginQueryEXT";
|
||||
if (mIsLost)
|
||||
return;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
mContext->BeginQuery(target, query, funcName);
|
||||
}
|
||||
|
|
@ -70,8 +76,10 @@ void
|
|||
WebGLExtensionDisjointTimerQuery::EndQueryEXT(GLenum target) const
|
||||
{
|
||||
const char funcName[] = "endQueryEXT";
|
||||
if (mIsLost)
|
||||
return;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
mContext->EndQuery(target, funcName);
|
||||
}
|
||||
|
|
@ -80,8 +88,10 @@ void
|
|||
WebGLExtensionDisjointTimerQuery::QueryCounterEXT(WebGLQuery& query, GLenum target) const
|
||||
{
|
||||
const char funcName[] = "queryCounterEXT";
|
||||
if (mIsLost)
|
||||
return;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mContext->ValidateObject(funcName, query))
|
||||
return;
|
||||
|
|
@ -95,8 +105,10 @@ WebGLExtensionDisjointTimerQuery::GetQueryEXT(JSContext* cx, GLenum target, GLen
|
|||
{
|
||||
const char funcName[] = "getQueryEXT";
|
||||
retval.setNull();
|
||||
if (mIsLost)
|
||||
return;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
mContext->GetQuery(cx, target, pname, retval, funcName);
|
||||
}
|
||||
|
|
@ -108,8 +120,10 @@ WebGLExtensionDisjointTimerQuery::GetQueryObjectEXT(JSContext* cx,
|
|||
{
|
||||
const char funcName[] = "getQueryObjectEXT";
|
||||
retval.setNull();
|
||||
if (mIsLost)
|
||||
return;
|
||||
|
||||
if (mIsLost || !mContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
mContext->GetQueryParameter(cx, query, pname, retval, funcName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue