Fix not deallocating device data after changing OGL compositors. (bug 1350259, r=mattwoodrow)

This commit is contained in:
David Anderson
2017-03-27 14:03:59 -07:00
parent 7bfb950e49
commit dd9507885a

View File

@@ -204,11 +204,10 @@ void
TextureImageTextureSourceOGL::SetTextureSourceProvider(TextureSourceProvider* aProvider)
{
GLContext* newGL = aProvider ? aProvider->GetGLContext() : nullptr;
if (!mGL) {
mGL = newGL;
} else if (mGL != newGL) {
if (!newGL || mGL != newGL) {
DeallocateDeviceData();
}
mGL = newGL;
}
gfx::IntSize