Bug 994024 - Discard TextureClients that we failed to allocate or lock. r=bjacob

This commit is contained in:
Nicolas Silva 2014-04-11 18:48:10 +02:00
Родитель 1092a96105
Коммит 16d9ae1433
2 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -81,6 +81,7 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
}
if (!mBuffer->Lock(OPEN_WRITE_ONLY)) {
mBuffer = nullptr;
return;
}

Просмотреть файл

@ -176,6 +176,7 @@ ImageClientSingle::UpdateImageInternal(ImageContainer* aContainer,
}
if (!mFrontBuffer->Lock(OPEN_WRITE_ONLY)) {
mFrontBuffer = nullptr;
return false;
}
bool status = mFrontBuffer->AsTextureClientYCbCr()->UpdateYCbCr(*data);
@ -243,6 +244,7 @@ ImageClientSingle::UpdateImageInternal(ImageContainer* aContainer,
}
if (!mFrontBuffer->Lock(OPEN_WRITE_ONLY)) {
mFrontBuffer = nullptr;
return false;
}