mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 632587 - 1/3 - implement getSupportedExtensions - r=bjacob, a=blocking2.0
This commit is contained in:
parent
e89d52fbce
commit
ce24155a82
@ -895,3 +895,34 @@ WebGLActiveInfo::GetName(nsAString & aName)
|
||||
aName = mName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WebGLContext::GetSupportedExtensions(nsIVariant **retval)
|
||||
{
|
||||
nsCOMPtr<nsIWritableVariant> wrval = do_CreateInstance("@mozilla.org/variant;1");
|
||||
NS_ENSURE_TRUE(wrval, NS_ERROR_FAILURE);
|
||||
|
||||
nsTArray<const char *> extList;
|
||||
|
||||
/* no extensions to add to extList */
|
||||
|
||||
nsresult rv;
|
||||
if (extList.Length() > 0) {
|
||||
rv = wrval->SetAsArray(nsIDataType::VTYPE_CHAR_STR, nsnull,
|
||||
extList.Length(), &extList[0]);
|
||||
} else {
|
||||
rv = wrval->SetAsEmptyArray();
|
||||
}
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
*retval = wrval.forget().get();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WebGLContext::GetExtension(const nsAString& aName, nsISupports **retval)
|
||||
{
|
||||
*retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -4410,10 +4410,3 @@ int mozilla::GetWebGLTexelFormat(GLenum format, GLenum type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WebGLContext::GetExtension(const nsAString& aName, nsISupports **retval)
|
||||
{
|
||||
*retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ interface nsIWebGLUniformLocation : nsISupports
|
||||
};
|
||||
|
||||
|
||||
[scriptable, uuid(2f21ca21-9720-4eee-ad94-27eefe4f72dc)]
|
||||
[scriptable, uuid(7cb54577-df8d-40bf-b7bb-2ddec3600a2c)]
|
||||
interface nsIDOMWebGLRenderingContext : nsISupports
|
||||
{
|
||||
//
|
||||
@ -836,5 +836,6 @@ interface nsIDOMWebGLRenderingContext : nsISupports
|
||||
[noscript] DOMString mozGetUnderlyingParamString(in WebGLenum pname);
|
||||
|
||||
// extensions
|
||||
nsIVariant getSupportedExtensions();
|
||||
nsISupports getExtension(in DOMString name);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user