зеркало из https://github.com/mozilla/gecko-dev.git
Bug 675073 - Release OpenGL textures with the global context if the creating context has been destroyed. r=joe
This commit is contained in:
Родитель
bf397acbd6
Коммит
fac88d4499
|
@ -111,6 +111,15 @@ GLTexture::Release()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mContext->IsDestroyed() && !mContext->IsGlobalSharedContext()) {
|
||||||
|
mContext = mContext->GetSharedContext();
|
||||||
|
if (!mContext) {
|
||||||
|
NS_ASSERTION(!mTexture,
|
||||||
|
"Context has been destroyed and couldn't find a shared context!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mTexture) {
|
if (mTexture) {
|
||||||
if (NS_IsMainThread() || mContext->IsGlobalSharedContext()) {
|
if (NS_IsMainThread() || mContext->IsGlobalSharedContext()) {
|
||||||
mContext->MakeCurrent();
|
mContext->MakeCurrent();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче