Bug 882590 - Fix invalid assertion when creating a SharedSurface_GLTexture without a consumer GLContext. r=jgilbert

This commit is contained in:
Matt Woodrow 2013-06-17 14:48:41 +12:00
parent 66a85c4495
commit 9547a3712c

View File

@ -314,8 +314,8 @@ SharedSurface_GLTexture::Create(GLContext* prodGL,
const gfxIntSize& size,
bool hasAlpha)
{
MOZ_ASSERT(prodGL && consGL);
MOZ_ASSERT(prodGL->SharesWith(consGL));
MOZ_ASSERT(prodGL);
MOZ_ASSERT(!consGL || prodGL->SharesWith(consGL));
prodGL->MakeCurrent();
GLuint tex = prodGL->CreateTextureForOffscreen(formats, size);
@ -386,6 +386,7 @@ SharedSurface_GLTexture::SetConsumerGL(GLContext* consGL)
{
MutexAutoLock lock(mMutex);
MOZ_ASSERT(consGL);
MOZ_ASSERT(mGL->SharesWith(consGL));
mConsGL = consGL;
}